You can use this endpoint to send up to 50 SMS messages in a single request. Each message is validated and processed independently; the response reports per-message acceptance and per-message validation errors.
Use Cases
You can send transactional SMS messages for:
System notifications, password reset messages, and login codes
Order confirmations, shipping updates, and delivery alerts
Appointment confirmations and ticket booking confirmations
Welcome messages and recurring billing notifications
Endpoint and Headers
POST https://gw.useinsider.com/api/sms/v1/sendMultipleMessage
Visit our Postman collection to test this request.
Headers
Header | Sample Value | Description |
|---|---|---|
Authorization | Bearer | Bearer access token obtained from the /auth/token endpoint. This key is required to authorize your request. Refer to Generate an OAuth 2.0 Token for SMS to generate your OAuth 2.0 token. |
Content-Type | application/json | Specifies the media type of the request body. |
Body Parameters
Parameter | Description | Data Type | Required |
|---|---|---|---|
sender | Default sender for all messages in the batch. | String | No |
messages | Array of message objects. Minimum 1 entry, maximum 50 entries. | Array (Object) | Yes |
Message Object
Parameter | Description | Data Type | Required |
|---|---|---|---|
phoneNumber | Recipient phone number in E.164 format. | String | Yes |
content | SMS body. Length between 1 and 670 characters. | String | Yes |
callback | Per-message webhook URL for delivery events. | URL | No |
sendAt | Per-message ISO 8601 schedule timestamp. | String | No |
uniqueArgs | Per-message correlation metadata. | Object | No |
settings | Per-message send-time options. | Object | No |
Sample Request
curl --location 'https://gw.useinsider.com/api/sms/v1/sendMultipleMessage' \
--header 'Authorization: Bearer eyJhbGc...' \
--header 'Content-Type: application/json' \
--data '{
"sender": "BRAND_SMS",
"messages": [
{ "phoneNumber": "+905551234567", "content": "Hi Ahmet, your order has shipped.", "uniqueArgs": { "userId": "u-1" } },
{ "phoneNumber": "+905557654321", "content": "Hi Ayse, your order has shipped.", "uniqueArgs": { "userId": "u-2" } }
]
}'Sample Responses
202 All Accepted
{
"message": "Accepted",
"messageIds": [
{ "phoneNumber": "+905551234567", "messageId": "sms-a..." },
{ "phoneNumber": "+905557654321", "messageId": "sms-b..." }
]
}201: Partially Accepted
When some messages pass validation, and others don't, the API returns 201 with both successful message IDs and per-message errors.
{
"message": "Accepted",
"messageIds": [
{ "phoneNumber": "+905551234567", "messageId": "sms-a..." }
],
"errors": [
{ "field": "messages[1].phoneNumber", "error": "must be a valid phone number" }
]
}400: All Rejected
{
"message": "Failed to validate request",
"errors": [
{ "field": "messages[0].content", "error": "is required" },
{ "field": "messages[1].phoneNumber", "error": "must be a valid phone number" }
]
}Batch-Specific Error Responses
{ "message": "Maximum 50 messages are allowed", "errorCode": "1017" }For other error codes, refer to the table below.
errorCode | HTTP | Description |
|---|---|---|
1000 | 400 | Invalid JSON content supplied (single send). |
1001 | 400 | Request body failed validation. Per-field errors are included in the response. |
1004 | 400 | Country quota lookup failed, or the message content domain is not allowed for this account. |
1011 | 400 | Invalid JSON content supplied (batch send). |
1017 | 400 | Batch exceeds 50 messages. |
1015 | 500 | Provider maintenance mode is active. Retry later. |
1022 | 403 | Your panel is suspended. |
1024 | 403 | Your panel is deactivated. |
1025 | 403 | Transactional messaging is disabled on your account. |
1016 | 403 | The specified sender was not found or is inactive. |
1018 | 403 | Sender provider settings are missing or invalid. |
Limitations
Requests made with the sms-transactional scope are limited to 60,000 requests per 60 seconds, with a burst limit of 1,000 requests.
If the limit is exceeded, the API returns a 429 Too Many Requests response with a Retry-After header indicating when you can retry the request.
SMS body must be between 1 and 670 characters.
Emojis and non-GSM-7 characters switch the encoding to UCS-2, which uses 70 characters per segment instead of 160. Use smartEncoding to automatically convert common characters.
Request body size is capped at ~19.9 MB.
Batch sends are capped at 50 messages per request.