Skip to content

JSON API (v2)

API for sending messages via SMS, Viber, WhatsApp and other communication channels.

JSON API v2

API key is required for all requests. You can find your API key in your account settings.

API versions (http-api and xml-api) are deprecated also and you should use this JSON API v2 instead.

Download OpenAPI description
Languages
Servers
Mock server

https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/

Responds with your request data

https://api.smsmngr.com/v2/

Sending messages

For sending messages use one of the following endpoints.

  • /message for sending a message up to 10 recipients
  • /messages for sending multiple messages (up to 10 messages at once)
  • /simple/message for sending a simple message (GET and POST)
Operations

Webhooks

Webhooks

Sent message webhookWebhook

Request

This webhook sends you information about sent messages. You can use this webhook to save information about sent messages, such as message_id, gateway, timestamp, payload, etc.

Bodyapplication/jsonrequiredArray [
request_idstring
Example: "bc36f3d1-d284-463a-921b-a3560c154649"
message_idstring

Unique message identifier. (if you use /messages endpoint, then you will receive message_id with -<recipient_index> appended to the message_id).

Example: "e27ff0ac-87b5-4e1d-b644-5fc6029e2a11"
gatewaystring

Used flow for the message.

Enum"sms""viber""whatsapp_text""whatsapp_template"
Example: "sms"
timestampinteger
Example: 1700000000
payloadobject
Example: {"campaign_id":"winter-sale"}
typestring
Default "outgoing"
toobject
resultstring

Result of the message sending. First, you will receive sent status, then another statuses will follow. If the message is rejected, that means that the message was not even sent (typical reason is insufficient credit or invalid phone number).

Enum"delivered""undelivered""rejected""failed""sending""sent""seen"
result_infostring

Additional result code for the message in format "[code] Description". Code is optional, description is also optional. Result info can also contain only code inside square brackets or only description without code.

smsobject
whatsapp_templateobject
viberobject
whatsapp_bodyobject
]
application/json
[ { "request_id": "bc36f3d1-d284-463a-921b-a3560c154649", "message_id": "e27ff0ac-87b5-4e1d-b644-5fc6029e2a11", "gateway": "sms", "timestamp": 1700000000, "payload": {}, "type": "outgoing", "to": {}, "result": "delivered", "result_info": "[0] Delivered" } ]

Incoming reply message webhookWebhook

Request

Bodyapplication/jsonrequiredArray [
request_idstring

Unique request identifier used for sent message to the recipient.

Example: "bc36f3d1-d284-463a-921b-a3560c154649"
message_idstring

Unique message identifier used for sent message to the recipient.

Example: "e27ff0ac-87b5-4e1d-b644-5fc6029e2a11"
payloadobject
Example: {"campaign_id":"winter-sale"}
gatewaystring

Used flow for the message. Note, that for whatsapp_body instead of whatsapp_template you will receive only whatsapp (incoming messages are not split into whatsapp_body or whatsapp_template).

Enum"sms""viber""whatsapp"
timestampinteger

Timestamp of the message in Unix timestamp format. This is the timestamp of the message has been sent by the sender (if that infomration is not available, then you will receive timestamp of the message has been received by our system).

Example: 1700000000
typestring

Type of the message.

Default "incoming"
senderstring

Sender of the message. In some countries, the alphameric sender is not fully supported.

Example: "420777123456"
recipientstring

Recipient of the message.

Example: "420777654321"
bodystring

Body of the message.

Example: "Thank you!"
]
application/json
[ { "request_id": "bc36f3d1-d284-463a-921b-a3560c154649", "message_id": "e27ff0ac-87b5-4e1d-b644-5fc6029e2a11", "payload": {}, "gateway": "sms", "timestamp": 1700000000, "type": "incoming", "sender": "420777123456", "recipient": "420777654321", "body": "Thank you!" } ]

Incoming message webhookWebhook

Request

Bodyapplication/jsonrequiredArray [
gatewaystring

Used flow for the message.

Enum"sms""viber""whatsapp"
timestampinteger

Timestamp of the message in Unix timestamp format. This is the timestamp of the message has been sent by the sender (if that information is not available, then you will receive timestamp of the message has been received by our system).

Example: 1700000000
typestring

Type of the message.

Default "incoming"
senderstring

Sender of the message. In some countries, the alphameric sender is not fully supported.

Example: "420777123456"
recipientstring

Recipient of the message.

Example: "420777654321"
bodystring
]
application/json
[ { "gateway": "whatsapp", "timestamp": 1700000000, "type": "incoming", "sender": "420777123456", "recipient": "420777654321", "body": "Hello, I have a question." } ]