---
title: "Send Batch SMS Message"
method: POST
path: "/v3/messages/batch"
tags: ["Messages"]
---

# Send Batch SMS Message

`POST /v3/messages/batch`

This endpoint allows you to send multiple outbound SMS messages.

## Request body

- BatchMTBody
  - `from` string, required — <p>Source address of the message.</p> <p>Specifies the Shortcode (from 1 to 6 digits), Longcode (from 7 digits on), an alphanumeric shortcode (ex. COMPANY) or a virtual number that will be used to originate and send the SMS message. Any of these codes will appear in the handset as the source of the text message. Virtual numbers will translate to a local shortcode depending on the destination carrier.</p> <p><i>If you don't have one assigned yet please contact our support team to request one.</i></p>
  - `text` string, required — <p>Content of the SMS message that will be sent to the end user.</p> <p>The maximum length of a short message text is <b>160 characters</b> using the default GSM 03.38 alphabet. If you use any character that is not in the default alphabet, the message will be encoded in Unicode and will be divided in <b>segments</b> of a maximum of 70 characters each. For example, if you include an emoji in your message and the message is 150 characters long, it will be divided into three segments: the first one with 70 characters, the second one with 70 characters and the third one with just 10 characters.</p> <p>You will be charged per segment, not per message.</p>
  - `to` DestinationRequest[], required — Array of <b>destination addresses</b> containing end users you want to send the message.
    - `to` string, required — <p>Destination address of the message. This is the cell phone number where you want to send your message to.</p> <p><i>The destination address must be specified in E.164 format -> ('+' and a country code). The plus sign prefix of the format is optional.</i></p>
    - `params` string[] — <p><i>Only applies if the content of the SMS message (<code>´text´</code>) contains personalized fields (placeholders).</i></p> <p>Array of personalized fields (placeholders) <b>values</b> containing the SMS message.</p> <p>Set placeholder/s values in order (position) of how each placeholder was defined in the SMS message.</p> <p>For example, from the <code>´text´</code> parameter you entered the following message that includes 2 placeholders: Welcome to New York {0}, the temperature according to your location is {1} °C, enjoy the trip! Now you must enter the values of both placeholders in the order they were defined and be separated by commas -> {Elizabeth, 28}. The first placeholder value represents the name of the end user that will receive the message and the second placeholder value represents the degrees of temperature where the end user is located.</p>
  - `type` 'MT' | 'MO', required — <p><i>Optional.</i> <code>MT</code>: Message sent from the mobile SMS provider system to the end user's mobile phone.</p> <p>By default is <code>´MT´</code></p>
  - `externalId` string — <p><i>Optional.</i> Alphanumeric identifier that can be used for reporting purposes. For instance, you could set the name or ID of the action that originated this SMS message so you can then identify where this API call is coming from.</p> <p>This is an identifier you can use to identify your messages uniquely. Typical applications are to assign a different identifier per message or per group of messages. This identifier will be sent back to you if you request callbacks containing status changes of the messages you send.</p>
  - `requestDR` boolean — <p><i>Optional.</i> Request a Delivery Receipt to the carrier.</p> <p><code>´true´</code>: Operator notifies the state of a message while it is in transit to its destination. <i>We recommend you use this option.</i></p> <p><code>´false´</code>: Operator won't notify the state of a message while it is in transit to its destination.</p> <p>By default is <code>´false´</code></p>
  - `connection` string — <p><i>Optional.</i> Name of the connection to indicate which carrier to send the message to. This is only used in cases where there are ambiguities between the destination carriers you are allowed to send to.</p> <p><i>If you need to indicate this parameter, Messangi will provide you a list of connection names to use for your case.</i></p>
  - `callbacks` string[] — <p><i>Optional.</i> To know the possible SMS status that will be registered on your callback URL once the message is sent, refer to the <a href='https://docs.messangi.com/docs/sms-status'>SMS Status</a> section.</p> <p>To know the parameters that will be registered and sent to your callback URL in JSON format go to the <a href='https://docs.messangi.com/docs/url-callback-mt'>Callback URL (MT)</a> section.</p>
  - `email` string — <i>Optional.</i> Email associated with destination.
  - `clientId` string — <i>Optional.</i> Unique user identifier that can be used for reporting purposes. This is an identifier you can use to uniquely identify the destination address in your systems. This is similar to the externalId and will be sent back to you if you are requesting callbacks that contain status changes of the messages you send.

## Response `202`

Posted batch messages

- BatchMessageResponse
  - `meta` MetadataDTO
    - `timestamp` integer, required — Transaction's date in timestamp
    - `transactionId` string, required — Id for the current transaction (Endpoint's call)
    - `explain` string — Explain string in case of failure
  - `data` BatchMessageBaseResponse
    - `ids` Destination[], required — Array containing the destination address of each end user and the unique identifier (id) of each message sent.
      - `id` string — Unique identifier of the SMS message.
      - `mobile` string — <p>Destination address of the message. This is the cell phone number where you want to send your message to.</p> <p><i>The destination address must be specified in E.164 format -> ('+' and a country code). The plus sign prefix of the format is optional.</i></p>
      - `params` string[] — <p><i>Only applies if the content of the SMS message (<code>´text´</code>) contains personalized fields (placeholders).</i></p> <p>Array of personalized fields (placeholders) <b>values</b> containing the SMS message.</p> <p>Set placeholder/s values in order (position) of how each placeholder was defined in the SMS message.</p> <p>For example, from the <code>´text´</code> parameter you entered the following message that includes 2 placeholders: Welcome to New York {0}, the temperature according to your location is {1} °C, enjoy the trip! Now you must enter the values of both placeholders in the order they were defined and be separated by commas -> {Elizabeth, 28}. The first placeholder value represents the name of the end user that will receive the message and the second placeholder value represents the degrees of temperature where the end user is located.</p>
    - `invalidNumber` string[] — Array containing invalid destination mobile numbers by validation format.
    - `from` string, required — <p>Source address of the message.</p> <p>Specifies the Shortcode (from 1 to 6 digits), Longcode (from 7 digits on), an alphanumeric shortcode (ex. COMPANY) or a virtual number that will be used to originate and send the SMS message. Any of these codes will appear in the handset as the source of the text message. Virtual numbers will translate to a local shortcode depending on the destination carrier.</p> <p><i>If you don't have one assigned yet please contact our support team to request one.</i></p>
    - `externalId` string — <p><i>Optional.</i> Alphanumeric identifier that can be used for reporting purposes. For instance, you could set the name or ID of the action that originated this SMS message so you can then identify where this API call is coming from.</p> <p>This is an identifier you can use to identify your messages uniquely. Typical applications are to assign a different identifier per message or per group of messages. This identifier will be sent back to you if you request callbacks containing status changes of the messages you send.</p>
    - `text` string, required — <p>Content of the SMS message that will be sent to the end user.</p> <p>The maximum length of a short message text is <b>160 characters</b> using the default GSM 03.38 alphabet. If you use any character that is not in the default alphabet, the message will be encoded in Unicode and will be divided in <b>segments</b> of a maximum of 70 characters each. For example, if you include an emoji in your message and the message is 150 characters long, it will be divided into three segments: the first one with 70 characters, the second one with 70 characters and the third one with just 10 characters.</p> <p>You will be charged per segment, not per message.</p>
    - `requestDR` boolean — <p><i>Optional.</i> Request a Delivery Receipt to the carrier.</p> <p><code>´true´</code>: Operator notifies the state of a message while it is in transit to its destination. <i>We recommend you use this option.</i></p> <p><code>´false´</code>: Operator won't notify the state of a message while it is in transit to its destination.</p> <p>By default is <code>´false´</code></p>
    - `connection` string — <p><i>Optional.</i> Name of the connection to indicate which carrier to send the message to. This is only used in cases where there are ambiguities between the destination carriers you are allowed to send to.</p> <p><i>If you need to indicate this parameter, Messangi will provide you a list of connection names to use for your case.</i></p>
    - `callbacks` string[] — <p><i>Optional.</i> To know the possible SMS status that will be registered on your callback URL once the message is sent, refer to the <a href='https://docs.messangi.com/docs/sms-status'>SMS Status</a> section.</p> <p>To know the parameters that will be registered and sent to your callback URL in JSON format go to the <a href='https://docs.messangi.com/docs/url-callback-mt'>Callback URL (MT)</a> section.</p>
    - `email` string — <i>Optional.</i> Email associated with destination.
    - `type` 'MT' | 'MO' — Type of message to be sent, default is 'MT'
    - `clientId` string — customer's identifier
    - `owner` string — Owner or creator of the SMS transaction.
    - `operator` string — User who is a member of the owner or creator of the SMS message.
    - `status` string — <p>When the SMS message is sent, the system assigns one of the following possible status to an SMS message:</p> <p><ul> <li><p><code>QUEUE</code>: SMS message is queued. Acknowledged by internal delivery process but not yet sent.</p></li> <li><p><code>DEQUEUED</code>: The SMS message has been removed from the queue and is ready to be published on the mobile operator.</p></li> <li><p><code>ERROR</code>: An error occurred in the API logic and the message could not be delivered. <p>If the Error message is the following <code>´Text exceeds the limit of allowed segments´</code>, it indicates that the number of permissible segments has been surpassed. This occurs when the message exceeds the 160-character limit per segment, therefore the the message cannot be sent. To resolve this issue, ensure that your SMS messages do not exceed 1600 characters to avoid reaching the segment limit.</p> </p></li> </ul></p>
    - `date` string, date-time — Date when the last update or status change.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.dev/messangi/apis/raven.md) · [All operations](https://skmtc.dev/messangi/apis/raven/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/messangi/raven/revisions/c87f398fa338/schema)
