Sinch SMS API is one of the easiest APIs we offer and enables you to add fast and reliable global SMS to your applications. Send single messages, scheduled batch messages, use available message templates and more.
API Overview | Sinch (v1)
https://{region}.sms.api.sinch.com/
Delivery reports
The REST API uses message statuses and error codes in delivery reports, which refer to the state of the batch and can be present in either Retrieve a delivery report or sent as a callback.
Groups
A group is a set of phone numbers (or MSISDNs) that can be used as a target when sending an SMS. An phone number (MSISDN) can only occur once in a group and any attempts to add a duplicate are ignored but not rejected.
Your service plan ID. You can find this on your Dashboard.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches/{batch_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches/01FC66621XXXXX119Z8PMV1QPQ \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK. A successful response , or an Error.
List of Phone numbers and group IDs that will receive the batch. More info
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Contains the parameters that will be used for customizing the message for each recipient.
Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediately. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be valid URL.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
Shows message on screen without user interaction while not saving the message to the inbox.
Message will be dispatched only if it is not split to more parts than Max Number of Message Parts
The type of number for the sender number. Use to override the automatic detection.
{ "id": "01FC66621XXXXX119Z8PMV1QPQ", "to": [ 15551231234, 15551256344 ], "from": 15551231234, "canceled": false, "parameters": { "{parameter_key}": { … } }, "body": "Hi ${name}! How are you?", "type": "mt_text", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "delivery_report": "none", "send_at": "2019-08-24T14:15:22Z", "expire_at": "2019-08-24T14:15:22Z", "callback_url": "myCallbackUrl", "client_reference": "myReference", "feedback_enabled": false, "flash_message": false, "truncate_concat": true, "max_number_of_message_parts": 1, "from_ton": 6, "from_npi": 18 }
Your service plan ID. You can find this on your Dashboard.
A list of phone numbers and group IDs that will receive the batch. More info.
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future the message will be delayed until send_at occurs.
Must be before expire_at.
If set in the past, messages will be sent immediately.
Formatted as ISO-8601. For example: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at.
Formatted as ISO-8601. For example: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be a valid URL. Learn how to set a default callback URL here.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch.
If set to true then feedback is expected after successful delivery.
The type of number for the sender number. Use to override the automatic detection.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches/{batch_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches/01FC66621XXXXX119Z8PMV1QPQ \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"to": [
15551231234,
15551256344
],
"body": "Hi ${name}! How are you?"
}'A successful response , or an Error.
List of Phone numbers and group IDs that will receive the batch. More info
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Contains the parameters that will be used for customizing the message for each recipient.
Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediately. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be valid URL.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
Shows message on screen without user interaction while not saving the message to the inbox.
Message will be dispatched only if it is not split to more parts than Max Number of Message Parts
The type of number for the sender number. Use to override the automatic detection.
{ "id": "01FC66621XXXXX119Z8PMV1QPQ", "to": [ "+15551231234", "+15551256344" ], "from": "+15551231234", "canceled": false, "parameters": { "property1": { … }, "property2": { … } }, "body": "Hi ${name}! How are you?", "type": "mt_text", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "delivery_report": "none", "send_at": "2019-08-24T14:15:22Z", "expire_at": "2019-08-24T14:15:22Z", "callback_url": "string", "client_reference": "myReference", "feedback_enabled": false, "flash_message": false, "truncate_concat": true, "max_number_of_message_parts": 1, "from_ton": 6, "from_npi": 18 }
Your service plan ID. You can find this on your Dashboard.
Sender number. Must be valid phone number, short code or alphanumeric.
List of phone numbers and group IDs to add to the batch.
List of phone numbers and group IDs to remove from the batch.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set, in the future the message will be delayed until send_at occurs. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Constraints: Must be before expire_at. If set in the past, messages will be sent immediately.
If set, the system will stop trying to deliver the message at this point.
Constraints: Must be after send_at
Default: 3 days after send_at
Override the default callback URL for this batch.
Constraints: Must be valid URL.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
The type of number for the sender number. Use to override the automatic detection.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches/{batch_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches/01FC66621XXXXX119Z8PMV1QPQ \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"to_remove": [
"YOUR_numbers",
"to_remove",
"as_strings_in_array",
"with_country_code",
"16267890123"
],
"to_add": [
"YOUR_numbers",
"to_add"
]
}'A successful response , or an Error.
List of Phone numbers and group IDs that will receive the batch. More info
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Contains the parameters that will be used for customizing the message for each recipient.
Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediately. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be valid URL.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
Shows message on screen without user interaction while not saving the message to the inbox.
Message will be dispatched only if it is not split to more parts than Max Number of Message Parts
The type of number for the sender number. Use to override the automatic detection.
{ "id": "01FC66621XXXXX119Z8PMV1QPQ", "to": [ 15551231234, 15551256344 ], "from": 15551231234, "canceled": false, "parameters": { "{parameter_key}": { … } }, "body": "Hi ${name}! How are you?", "type": "mt_text", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "delivery_report": "none", "send_at": "2019-08-24T14:15:22Z", "expire_at": "2019-08-24T14:15:22Z", "callback_url": "myCallbackUrl", "client_reference": "myReference", "feedback_enabled": false, "flash_message": false, "truncate_concat": true, "max_number_of_message_parts": 1, "from_ton": 6, "from_npi": 18 }
Request
A batch can be canceled at any point. If a batch is canceled while it's currently being delivered some messages currently being processed might still be delivered. The delivery report will indicate which messages were canceled and which weren't.
Canceling a batch scheduled in the future will result in an empty delivery report while canceling an already sent batch would result in no change to the completed delivery report.
Your service plan ID. You can find this on your Dashboard.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches/{batch_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches/01FC66621XXXXX119Z8PMV1QPQ \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Batch deleted or an Error.
List of Phone numbers and group IDs that will receive the batch. More info
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Contains the parameters that will be used for customizing the message for each recipient.
Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediately. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be valid URL.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
Shows message on screen without user interaction while not saving the message to the inbox.
Message will be dispatched only if it is not split to more parts than Max Number of Message Parts
The type of number for the sender number. Use to override the automatic detection.
{ "id": "01FC66621XXXXX119Z8PMV1QPQ", "to": [ 15551231234, 15551256344 ], "from": 15551231234, "canceled": true, "parameters": { "{parameter_key}": { … } }, "body": "Hi ${name}! How are you?", "type": "mt_text", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "delivery_report": "none", "send_at": "2019-08-24T14:15:22Z", "expire_at": "2019-08-24T14:15:22Z", "callback_url": "myCallbackUrl", "client_reference": "myReference", "feedback_enabled": false, "flash_message": false, "truncate_concat": true, "max_number_of_message_parts": 1, "from_ton": 6, "from_npi": 18 }
Your service plan ID. You can find this on your Dashboard.
Only list messages received at or after this date/time. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Default: Now-24
Only list messages received before this date/time. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Only list messages sent from this sender number. Multiple originating numbers can be comma separated. Must be phone numbers or short code.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches?page=2&page_size=50&start_date=2019-08-24T14%3A15%3A22Z&end_date=2019-08-24T14%3A15%3A22Z&from=44345%2C45607&client_reference=myReference' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK. A successful response, or an Error.
{ "count": "2", "page": "1", "batches": [ { … }, { … } ], "page_size": "10" }
Request
Send a message or a batch of messages.
Depending on the length of the body, one message might be split into multiple parts and charged accordingly.
Any groups targeted in a scheduled batch will be evaluated at the time of sending. If a group is deleted between batch creation and scheduled date, it will be considered empty.
Be sure to use the correct region in the server URL.
Your service plan ID. You can find this on your Dashboard.
Default schema is Text if type is not specified
List of Phone numbers and group IDs that will receive the batch. More info
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Contains the parameters that will be used for customizing the message for each recipient.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediately. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be a valid URL. Learn how to set a default callback URL here.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
Shows message on screen without user interaction while not saving the message to the inbox.
Message will be dispatched only if it is not split to more parts than Max Number of Message Parts
The type of number for the sender number. Use to override the automatic detection.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"from": "YOUR_Sinch_virtual_number",
"to": [
"YOUR_recipient_number"
],
"body": "YOUR_message_body",
"type": "mt_text"
}'Created. A successful response, or an Error.
List of Phone numbers and group IDs that will receive the batch. More info
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Contains the parameters that will be used for customizing the message for each recipient.
Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future, the message will be delayed until send_at occurs. Must be before expire_at. If set in the past, messages will be sent immediately. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at. Formatted as ISO-8601: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be valid URL.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch
If set to true, then feedback is expected after successful delivery.
Shows message on screen without user interaction while not saving the message to the inbox.
Message will be dispatched only if it is not split to more parts than Max Number of Message Parts
The type of number for the sender number. Use to override the automatic detection.
{ "id": "01FC66621XXXXX119Z8PMV1QPQ", "to": [ 15551231234, 15551256344 ], "from": 15551231234, "canceled": false, "parameters": { "{parameter_key}": { … } }, "body": "Hi ${name}! How are you?", "type": "mt_text", "created_at": "2019-08-24T14:15:22Z", "modified_at": "2019-08-24T14:15:22Z", "delivery_report": "none", "send_at": "2019-08-24T14:15:22Z", "expire_at": "2019-08-24T14:15:22Z", "callback_url": "myCallbackUrl", "client_reference": "myReference", "feedback_enabled": false, "flash_message": false, "truncate_concat": true, "max_number_of_message_parts": 1, "from_ton": 6, "from_npi": 18 }
Request
Send feedback if your system can confirm successful message delivery.
Feedback can only be provided if feedback_enabled was set when batch was submitted.
Batches: It is possible to submit feedback multiple times for the same batch for different recipients. Feedback without specified recipients is treated as successful message delivery to all recipients referenced in the batch. Note that the recipients key is still required even if the value is empty.
Groups: If the batch message was created using a group ID, at least one recipient is required. Excluding recipients (an empty recipient list) does not work and will result in a failed request.
Your service plan ID. You can find this on your Dashboard.
A list of phone numbers (MSISDNs) that successfully received the message.
A list of phone numbers (MSISDNs) that have successfully received the message. The key is required, however, the value can be an empty array ([]) for a batch. If the feedback was enabled for a group, at least one phone number is required.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches/{batch_id}/delivery_feedback
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches/01FC66621XXXXX119Z8PMV1QPQ/delivery_feedback \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"recipients": [
"+15551231234",
"+15551256344"
]
}'Accepted, or an Error. A successful response will return an empty 202 HTTP response, indicating that the request has been received and is processing.
No contentYour service plan ID. You can find this on your Dashboard.
Whether to include per recipient details in the response
A list of phone numbers and group IDs that will receive the batch. More info.
Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.
Kind of delivery report
| Enum Value | Description |
|---|---|
| none | No delivery report callback will be sent. |
| summary | A single delivery report callback will be sent. |
| full | A single delivery report callback will be sent which includes a list of recipients per delivery status. |
| per_recipient | A delivery report callback will be sent for each status change of a message. This could result in a lot of callbacks and should be used with caution for larger batches. These delivery reports also include a timestamp of when the Delivery Report originated from the SMSC. |
| per_recipient_final | A delivery report callback representing the final status of a message will be sent for each recipient. This will send only one callback per recipient, compared to the multiple callbacks sent when using |
If set in the future the message will be delayed until send_at occurs.
Must be before expire_at.
If set in the past, messages will be sent immediately.
Formatted as ISO-8601. For example: YYYY-MM-DDThh:mm:ss.SSSZ.
If set, the system will stop trying to deliver the message at this point. Must be after send_at. Default and max is 3 days after send_at.
Formatted as ISO-8601. For example: YYYY-MM-DDThh:mm:ss.SSSZ.
Override the default callback URL for this batch. Must be a valid URL. Learn how to set a default callback URL here.
The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch.
If set to true then feedback is expected after successful delivery.
The type of number for the sender number. Use to override the automatic detection.
- Global API
https://us.sms.api.sinch.com/xms/v1/{service_plan_id}/batches/dry_run
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://us.sms.api.sinch.com/xms/v1/jd63jf88477ll123ab4567cd89012ef3/batches/dry_run?per_recipient=true&number_of_recipients=500' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"from": "YOUR_virtual_number",
"to": [
"YOUR_numbers_sending_to",
"another_number"
],
"body": "YOUR body text here",
"parameters": {
"name": {
"Phone_number_of_recipient": "recipient_name",
"default": "default_in_place_of_name"
}
}
}'OK. A successful response , or an Error.
The total number of SMS message parts to be sent in the batch
{ "number_of_recipients": 1, "number_of_messages": 1, "per_recipient": [ { … } ] }