Skip to main content

Send SMS batch

POST 

/api/v1/subaccounts/:subAccountId/messages/batch

  • Sending a POST request to this endpoint allows you to send SMS by batches (1 request for multiple SMS) with shared or personalized contents/properties.
  • Personalized content is ideal for sending marketing campaigns or any mass personalized announcement.
  • Shared content is easier to use for such cases as an announcement, message broadcasting, etc.
  • It only accepts messages with the same properties (source, text, encoding, scheduling time, and expiry time).
  • Using this endpoint, it is possible to send up to 10,000 SMS per request.

URL​

The 8x8 SMS subaccountid to use is defined in the URL where you send your POST request as shown below:

https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/messages/batch

You must replace {subAccountId} in the URL above with the subaccountid that you want to use.

Request​

Responses​

  • The response returns two different IDs for the batch:

    • batchId: the unique batch ID generated automatically by 8x8
    • clientBatchId: the batch ID that you submitted in the request (if any)
  • It also returns a summary of the batch submission:

    • acceptedCount: number of SMS accepted by the API
    • rejectedCount: number of SMS rejected by the API
  • If the includeMessagesInResponse boolean has been set to True during the request, it also returns an array containing individual information for each SMS submitted to the API in the many request:

    • umid: unique message ID automatically generated by 8x8
    • clientMessageId: message ID that you submitted (if any)
    • destination: destination phone number to which the SMS was sent to
    • encoding: SMS encoding - GSM7 or UCS2
  • And then it returns a status object containing the following:

    • status code: the status code can be either:
      • QUEUED: the SMS has been accepted by 8x8 SMS API and is queued for processing.
      • REJECTED: the SMS has been rejected by 8x8 SMS API and the reason is stated in the description field. It will not be processed.
    • description: this field describes the status code and provides additional information explaining the status. It can take the following values:
      • SMS is accepted and queued for processing (QUEUED Status)
      • Text value is missing (REJECTED Status)
      • Invalid Text value. Reached max allowed limit (REJECTED Status)
      • Invalid Source value. Reached max allowed limit (REJECTED Status)
      • Expiry time already reached (REJECTED Status)
      • Invalid MSISDN format (not E.164 international number) (REJECTED Status)
      • Internal server error (REJECTED Status)