Sending and managing messages

This article details commonly used API operations. Each section corresponds to an operation and includes a brief overview, a sample request and response payload, and schema information pulled directly from the API reference. Additionally, each section will include links to the corresponding API reference entry and any tutorials (if available).

Note:

For information on how complete the configuration steps required for this API, along with language-specific guides that illustrate the API's functionality with pre-populated examples, see the Getting started guides that correspond to this API.

The SMS REST API enables users to send, retreive, update and delete messages to one or more recipient(s) using batches. In simple terms, a batch consists of the message you want to send, your Sinch mobile number, and a list of recipients. With batches, you can do everything from appointment scheduling to marketing campaigns.

Sending a message

This endpoint enables you to send messages. As well as sending messages to multiple recipients, it allows users to schedule messages and even set an expiry date. This is useful for applications which require messages to be sent at particular times, such as appointment scheduling or marketing campaigns.

Note

Our Getting Started guides contain ready-made code samples for sending a message in the following languages:

Node | Node SDK | Java SDK | .NET | .NET SDK | Python SDK | PHP

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

application/json
{
  • "from": "YOUR_Sinch_virtual_number",
  • "to": [
    • "YOUR_recipient_number"
    ],
  • "body": "YOUR_message_body",
  • "type": "mt_text"
}
For all possible request body schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextRequest schema below:
See the schema
any (TextRequest)

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "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
}
For all possible response schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextResponse schema below:
See the schema
type
required
string

Regular SMS

Value Description
mt_text

Regular SMS

id
string

Unique identifier for batch

to
Array of strings <E.164> (MtDestination) [ 1 .. 1000 ] items

List of Phone numbers and group IDs that will receive the batch. More info

from
string

Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.

canceled
boolean
Default: false

Indicates if the batch has been canceled or not.

object (parameterObj)

Contains the parameters that will be used for customizing the message for each recipient.

Click here to learn more about parameterization.

body
string [ 0 .. 2000 ] characters

The message content

created_at
string <date-time>

Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

modified_at
string <date-time>

Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

delivery_report
string (DeliveryReportType)

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.

… 1 more
send_at
string <date-time>

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.

expire_at
string <date-time>

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.

callback_url
string [ 0 .. 2048 ] characters

Override the default callback URL for this batch. Must be valid URL.

client_reference
string [ 0 .. 2048 ] characters

The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch

feedback_enabled
boolean
Default: false

If set to true, then feedback is expected after successful delivery.

flash_message
boolean
Default: false

Shows message on screen without user interaction while not saving the message to the inbox.

truncate_concat
boolean

If set to true the message will be shortened when exceeding one part.

max_number_of_message_parts
integer <int32> >= 1

Message will be dispatched only if it is not split to more parts than Max Number of Message Parts

from_ton
integer <int32> [ 0 .. 6 ]

The type of number for the sender number. Use to override the automatic detection.

from_npi
integer <int32> [ 0 .. 18 ]

Number Plan Indicator for the sender number. Use to override the automatic detection.

Performing a dry run for a batch of recipients

This operation will perform a dry run of a batch which calculates the bodies and number of parts for all messages in the batch without actually sending any messages. If you are a new Sinch user, the Dry Run operation is perfect for testing how to send a message as it incurrs no costs. For existing users, the Dry Run operation is very useful for testing SMS marketing campaigns designed to engage high volumes of users and making sure there are no errors.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

application/json
{
  • "from": "YOUR_virtual_number",
  • "to": [
    • "YOUR_numbers_sending_to",
    • "another_number"
    ],
  • "body": "YOUR body text here",
  • "parameters": {
    • "name": {
      }
    }
}
For all possible request body schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextRequest schema below:
See the schema
any (TextRequest)

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "number_of_recipients": 1,
  • "number_of_messages": 1,
  • "per_recipient": [
    • {
      }
    ]
}

For the full schema of the response that corresponds to this API call, see the corresponding entry in the API reference. Alternatively, expand the schema below:

See the schema
number_of_recipients
integer

The number of recipients in the batch

number_of_messages
integer

The total number of SMS message parts to be sent in the batch

Array of objects

The recipient, the number of message parts to this recipient, the body of the message, and the encoding type of each message

Retrieving a list of batches

The list operation enables you to list batch messages that you have created in the last 14 days. This operation is highly customizable. Users can filter results by date range and from number. If there is a high volume of batches, results can be paginated. Pagination is flexible, with the page and page_size query parameters enabling users to set the number of pages and the number of results per page.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

For the full schema of this API call, see the corresponding entry.

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "count": "2",
  • "page": "1",
  • "batches": [
    • {
      },
    • {
      }
    ],
  • "page_size": "10"
}

For the full schema of the response that corresponds to this API call, see the corresponding entry in the API reference. Alternatively, expand the schema below:

See the schema
count
integer <int64>

The total number of entries matching the given filters.

page
integer <int32>

The requested page.

Array of objects (Batch)

The page of batches matching the given filters.

page_size
integer <int32>

The number of entries returned in this request.

Retrieving a message

This operation enables users to retrieve a message they created, by returning a specific batch that matches the batch_id provided in the path parameters. This is useful if you want to review messages to check for mistakes.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

For the full schema of this API call, see the corresponding entry.

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "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
}
For all possible response schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextResponse schema below:
See the schema
type
required
string

Regular SMS

Value Description
mt_text

Regular SMS

id
string

Unique identifier for batch

to
Array of strings <E.164> (MtDestination) [ 1 .. 1000 ] items

List of Phone numbers and group IDs that will receive the batch. More info

from
string

Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.

canceled
boolean
Default: false

Indicates if the batch has been canceled or not.

object (parameterObj)

Contains the parameters that will be used for customizing the message for each recipient.

Click here to learn more about parameterization.

body
string [ 0 .. 2000 ] characters

The message content

created_at
string <date-time>

Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

modified_at
string <date-time>

Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

delivery_report
string (DeliveryReportType)

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.

… 1 more
send_at
string <date-time>

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.

expire_at
string <date-time>

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.

callback_url
string [ 0 .. 2048 ] characters

Override the default callback URL for this batch. Must be valid URL.

client_reference
string [ 0 .. 2048 ] characters

The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch

feedback_enabled
boolean
Default: false

If set to true, then feedback is expected after successful delivery.

flash_message
boolean
Default: false

Shows message on screen without user interaction while not saving the message to the inbox.

truncate_concat
boolean

If set to true the message will be shortened when exceeding one part.

max_number_of_message_parts
integer <int32> >= 1

Message will be dispatched only if it is not split to more parts than Max Number of Message Parts

from_ton
integer <int32> [ 0 .. 6 ]

The type of number for the sender number. Use to override the automatic detection.

from_npi
integer <int32> [ 0 .. 18 ]

Number Plan Indicator for the sender number. Use to override the automatic detection.

Update a batch message

The upate operation works by updating all specified parameters of a batch that matches the batch_id provided in the path parameters. This gives users plenty of flexibility, they can change everything from the recipients and groups the message gets sent to, to the type of delivery report. This means users can tweak campaigns they have scheduled in response to new requirements.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

application/json
{
  • "to_remove": [
    • "YOUR_numbers",
    • "to_remove",
    • "as_strings_in_array",
    • "with_country_code",
    • "16267890123"
    ],
  • "to_add": [
    • "YOUR_numbers",
    • "to_add"
    ]
}
For all possible request body schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the ApiUpdateTextMtMessage schema below:
See the schema
any (ApiUpdateTextMtMessage)

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "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
}
For all possible response schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextResponse schema below:
See the schema
type
required
string

Regular SMS

Value Description
mt_text

Regular SMS

id
string

Unique identifier for batch

to
Array of strings <E.164> (MtDestination) [ 1 .. 1000 ] items

List of Phone numbers and group IDs that will receive the batch. More info

from
string

Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.

canceled
boolean
Default: false

Indicates if the batch has been canceled or not.

object (parameterObj)

Contains the parameters that will be used for customizing the message for each recipient.

Click here to learn more about parameterization.

body
string [ 0 .. 2000 ] characters

The message content

created_at
string <date-time>

Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

modified_at
string <date-time>

Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

delivery_report
string (DeliveryReportType)

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.

… 1 more
send_at
string <date-time>

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.

expire_at
string <date-time>

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.

callback_url
string [ 0 .. 2048 ] characters

Override the default callback URL for this batch. Must be valid URL.

client_reference
string [ 0 .. 2048 ] characters

The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch

feedback_enabled
boolean
Default: false

If set to true, then feedback is expected after successful delivery.

flash_message
boolean
Default: false

Shows message on screen without user interaction while not saving the message to the inbox.

truncate_concat
boolean

If set to true the message will be shortened when exceeding one part.

max_number_of_message_parts
integer <int32> >= 1

Message will be dispatched only if it is not split to more parts than Max Number of Message Parts

from_ton
integer <int32> [ 0 .. 6 ]

The type of number for the sender number. Use to override the automatic detection.

from_npi
integer <int32> [ 0 .. 18 ]

Number Plan Indicator for the sender number. Use to override the automatic detection.

Replace a message batch

This operation enables a users to replace a batch wholesale. It works by replacing all the parameters of a batch with the provided values. It is the same as cancelling a batch and sending a new one instead. This is useful in situations where simply modifying an existing batch isn't enough.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

application/json
{
  • "to": [
    • 15551231234,
    • 15551256344
    ],
  • "body": "Hi ${name}! How are you?"
}
For all possible request body schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextRequest schema below:
See the schema
any (TextRequest)

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "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
}
For all possible response schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextResponse schema below:
See the schema
type
required
string

Regular SMS

Value Description
mt_text

Regular SMS

id
string

Unique identifier for batch

to
Array of strings <E.164> (MtDestination) [ 1 .. 1000 ] items

List of Phone numbers and group IDs that will receive the batch. More info

from
string

Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.

canceled
boolean
Default: false

Indicates if the batch has been canceled or not.

object (parameterObj)

Contains the parameters that will be used for customizing the message for each recipient.

Click here to learn more about parameterization.

body
string [ 0 .. 2000 ] characters

The message content

created_at
string <date-time>

Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

modified_at
string <date-time>

Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

delivery_report
string (DeliveryReportType)

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.

… 1 more
send_at
string <date-time>

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.

expire_at
string <date-time>

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.

callback_url
string [ 0 .. 2048 ] characters

Override the default callback URL for this batch. Must be valid URL.

client_reference
string [ 0 .. 2048 ] characters

The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch

feedback_enabled
boolean
Default: false

If set to true, then feedback is expected after successful delivery.

flash_message
boolean
Default: false

Shows message on screen without user interaction while not saving the message to the inbox.

truncate_concat
boolean

If set to true the message will be shortened when exceeding one part.

max_number_of_message_parts
integer <int32> >= 1

Message will be dispatched only if it is not split to more parts than Max Number of Message Parts

from_ton
integer <int32> [ 0 .. 6 ]

The type of number for the sender number. Use to override the automatic detection.

from_npi
integer <int32> [ 0 .. 18 ]

Number Plan Indicator for the sender number. Use to override the automatic detection.

Cancel a batch message

This endpoint allows users to cancel a batch by batch_id provided in the path parameters. This enables a message to be cancelled before all the intended recipients receive it.
Note:

If a message has already been succesfully delivered, it can't be cancelled. It's therefore advisable to cancel a scheduled batch before the message is scheduled to be sent.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

For the full schema of the request that corresponds to this API call, see the corresponding entry in the API reference.

Sample response

After making this API call, you should receive a response that is similar to the example given below:

{
  • "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
}
For all possible response schemas that correspond to this API call, see the corresponding entry in the API reference. Alternatively, expand the TextResponse schema below:
See the schema
type
required
string

Regular SMS

Value Description
mt_text

Regular SMS

id
string

Unique identifier for batch

to
Array of strings <E.164> (MtDestination) [ 1 .. 1000 ] items

List of Phone numbers and group IDs that will receive the batch. More info

from
string

Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured.

canceled
boolean
Default: false

Indicates if the batch has been canceled or not.

object (parameterObj)

Contains the parameters that will be used for customizing the message for each recipient.

Click here to learn more about parameterization.

body
string [ 0 .. 2000 ] characters

The message content

created_at
string <date-time>

Timestamp for when batch was created. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

modified_at
string <date-time>

Timestamp for when batch was last updated. Formatted as ISO-8601:YYYY-MM-DDThh:mm:ss.SSSZ.

delivery_report
string (DeliveryReportType)

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.

… 1 more
send_at
string <date-time>

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.

expire_at
string <date-time>

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.

callback_url
string [ 0 .. 2048 ] characters

Override the default callback URL for this batch. Must be valid URL.

client_reference
string [ 0 .. 2048 ] characters

The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch

feedback_enabled
boolean
Default: false

If set to true, then feedback is expected after successful delivery.

flash_message
boolean
Default: false

Shows message on screen without user interaction while not saving the message to the inbox.

truncate_concat
boolean

If set to true the message will be shortened when exceeding one part.

max_number_of_message_parts
integer <int32> >= 1

Message will be dispatched only if it is not split to more parts than Max Number of Message Parts

from_ton
integer <int32> [ 0 .. 6 ]

The type of number for the sender number. Use to override the automatic detection.

from_npi
integer <int32> [ 0 .. 18 ]

Number Plan Indicator for the sender number. Use to override the automatic detection.

Send delivery feedback for a message

When a parameter called feedback_enabled is set in a send batch message call, the SMS API can provide feedback on whether the message was delivered successfully using this send delivery feedback API call. By providing the batch_id in the path parameter of this operation, users can get delivery feedback for the recipients in the corresponding batch. This is useful in for any user that needs to confirm that their messages are being received. For example, if you're running a marketing campaign, it's essential to have some measure of how successful it was.

Making a request

Below are code samples that highlight how to make this API request in multiple languages. Click an appropriate tab to view your preferred language:

application/json
{
  • "recipients": [
    • "+15551231234",
    • "+15551256344"
    ]
}

For the full schema of the request that corresponds to this API call, see the corresponding entry in the API reference. Alternatively, expand the schema below:

See the schema
any (recipients)

Response 202 if successful.

We'd love to hear from you!
Rate this content:
Still have a question?
 
Ask the community.