JSON API (v2)
API for sending messages via SMS, Viber, WhatsApp and other communication channels.
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.
https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/
https://api.smsmngr.com/v2/
List of recipients.
Callback URL for receiving delivery notifications (Webhook, see Webhooks).
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).
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.
Scheduled time for sending the message. Always in UTC timezone.
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.).
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/message
- Responds with your request data
https://api.smsmngr.com/v2/message
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
]
}'
{ "request_id": "string", "accepted": [ { … } ], "rejected": [ { … } ] }
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.
List of recipients.
Callback URL for receiving delivery notifications (Webhook, see Webhooks).
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).
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.
Scheduled time for sending the message. Always in UTC timezone.
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.).
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.
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/messages
- Responds with your request data
https://api.smsmngr.com/v2/messages
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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"
}
]
}
]'
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": [] }
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/simple/message
- Responds with your request data
https://api.smsmngr.com/v2/simple/message
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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'
{ "request_id": "66666666-6666-6666-6666-666666666666", "message_id": "pppppppp-qqqq-rrrr-ssss-tttttttttttt", "accepted": true }
- Mock server
https://api-ref.smsmanager.com/_mock/openapi/en/json/jsonapi_v2/simple/message
- Responds with your request data
https://api.smsmngr.com/v2/simple/message
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
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
{ "request_id": "11111111-1111-1111-1111-111111111111", "message_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "accepted": true }