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

Send a message

Request

Use this endpoint to send a message to one or more recipients (up to 10 recipients). If you want to use channels other than SMS (Viber, WhatsApp, etc.), you need to use the flow property.

Security
x-api-key
Bodyapplication/jsonrequired
bodystring<= 1000 charactersrequired

The message body (if not defined in the flow).

toArray of objects[ 1 .. 10 ] itemsrequired

List of recipients.

to[].​phone_numberstringrequired

Recipient's phone number. The international format (E.164, without leading + or 00) is recommended but also another format is accepted (before accepting the request, we will convert it to the international format).

Example: "420777123456"
callbackstring(uri)

Callback URL for receiving delivery notifications (Webhook, see Webhooks).

tagstring

Tag for the message. You can use it to group messages (e.g. by campaign id). There are also some special tags you can use: priority (for priority messages), transactional (for transactional messages).

Default "promotional"
paramsobject

By providing this object, you can pass special parameters to the message. Ask us how to use this parameter for shortening links or other features.

datetimestring(date-time)

Scheduled time for sending the message. Always in UTC timezone.

Example: "2025-01-11T10:00:00Z"
delivery_timeobject
flowArray of objects

A list of communication channels for the message flow. If defined, must not be empty. You can use multiple channels, the order of channels is important (first channel is the first to be used, if the first channel is not available or recipient does not accept it, the second channel is used, etc.).

payloadobject

You can send the message payload, where you can define any parameters for the message. This object is returned in the delivery notification and replies.

Example: {"user_id":"123456"}
curl -i -X POST \
  https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/message \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "body": "Test message",
    "to": [
      {
        "phone_number": "420777123456"
      }
    ]
  }'

Responses

Messages sent successfully

Bodyapplication/json
request_idstring

Unique request identifier.

acceptedArray of objects
rejectedArray of objects
Response
application/json
{ "request_id": "string", "accepted": [ { … } ], "rejected": [ { … } ] }

Send multiple messages

Request

Use this endpoint to send batch of identical messages to more recipients (you can set up to 10 recipients per request and up to 10 requests per one API call). That means, that you can send up to 100 recipients per single HTTP API call. If you want to use channels other than SMS (Viber, WhatsApp, etc.), you need to use the flow property. Using this endpoint, you will receive message_id for each of requests (not for each recipient). For get message_id for each recipient, you need to append -<recipient_index> to the message_id. More information about message_id you can find in documentation.

Security
x-api-key
Bodyapplication/jsonrequiredArray [
bodystring<= 1000 charactersrequired

The message body (if not defined in the flow).

toArray of objects[ 1 .. 10 ] itemsrequired

List of recipients.

to[].​phone_numberstringrequired

Recipient's phone number. The international format (E.164, without leading + or 00) is recommended but also another format is accepted (before accepting the request, we will convert it to the international format).

Example: "420777123456"
callbackstring(uri)

Callback URL for receiving delivery notifications (Webhook, see Webhooks).

tagstring

Tag for the message. You can use it to group messages (e.g. by campaign id). There are also some special tags you can use: priority (for priority messages), transactional (for transactional messages).

Default "promotional"
paramsobject

By providing this object, you can pass special parameters to the message. Ask us how to use this parameter for shortening links or other features.

datetimestring(date-time)

Scheduled time for sending the message. Always in UTC timezone.

Example: "2025-01-11T10:00:00Z"
delivery_timeobject
flowArray of objects

A list of communication channels for the message flow. If defined, must not be empty. You can use multiple channels, the order of channels is important (first channel is the first to be used, if the first channel is not available or recipient does not accept it, the second channel is used, etc.).

payloadobject

You can send the message payload, where you can define any parameters for the message. This object is returned in the delivery notification and replies.

Example: {"user_id":"123456"}
]
curl -i -X POST \
  https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/messages \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '[
    {
      "body": "Hello John",
      "to": [
        {
          "phone_number": "420777123456"
        },
        {
          "phone_number": "420777654321"
        }
      ]
    },
    {
      "body": "Hello Jane",
      "to": [
        {
          "phone_number": "420777115577"
        },
        {
          "phone_number": "420777223344"
        }
      ]
    }
  ]'

Responses

Messages sent successfully

Bodyapplication/json
request_idstring

Unique request identifier.

acceptedArray of objects
rejectedArray of objects
Response
application/json

Two requests with multiple recipients. Be careful, when you use /messages endpoint, then you will receive message_id for each of requests (not for each recipient). For get message_id for each recipient, you need to append -<recipient_index> to the message_id. For example, if you have two recipients for the first request, the first recipient will have message_id pppppppp-qqqq-rrrr-ssss-tttttttttttt-0 and the second recipient will have message_id pppppppp-qqqq-rrrr-ssss-tttttttttttt-1.

{ "request_id": "66666666-6666-6666-6666-666666666666", "accepted": [ { … }, { … } ], "rejected": [] }

Send a simple message (GET request)

Request

Security
apikey
Query
apikeystringrequired
phone_numberstringrequired
messagestringrequired
senderstringrequired
curl -i -X GET \
  'https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/simple/message?apikey=string%2CYOUR_API_KEY_HERE&phone_number=string&message=string&sender=string'

Responses

Simple message sent successfully

Bodyapplication/json
request_idstring

Unique request identifier.

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

Unique message identifier.

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

True if the message was accepted, false if rejected.

Example: true
Response
application/json
{ "request_id": "66666666-6666-6666-6666-666666666666", "message_id": "pppppppp-qqqq-rrrr-ssss-tttttttttttt", "accepted": true }

Send a simple message (POST request)

Request

Security
x-api-key
Bodyapplication/x-www-form-urlencodedrequired
phone_numberstringrequired
messagestringrequired
senderstringrequired
curl -i -X POST \
  https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/simple/message \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d phone_number=string \
  -d message=string \
  -d sender=string

Responses

Simple message sent successfully

Bodyapplication/json
request_idstring

Unique request identifier.

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

Unique message identifier.

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

True if the message was accepted, false if rejected.

Example: true
Response
application/json
{ "request_id": "11111111-1111-1111-1111-111111111111", "message_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "accepted": true }

Webhooks

Webhooks