Send batch
Sends SMS messages to up to 250 recipients in a single request, with the same text for the whole batch or a text per number. The send is asynchronous: the API validates the request, responds 202 Accepted immediately with a batch_id and one message_id per number (in the order of the request), and processes the numbers in the background.
text, has_accents and complement at the root are the batch defaults; each item of messages can override any of them. An item’s complement replaces the batch one entirely (link and ttl_events are not merged), and every number with a complement gets its own short link.
Numbers are validated against the mask in the background, so an invalid number does not reject the batch: it is reported with status INVALID_FORMAT (does not match the mask format), INVALID_SOURCE (not found in the numbering plan or not a mobile number) or OUTPUT_NOT_FOUND (no output for its operator).
webhook_mode selects the notifications: INDIVIDUAL (default) sends the regular status webhook per number, with an extra batch_id; BATCH sends a single batchStatus webhook once every number has a send result.
Authentication
Account authentication key. The App-Key must have the SMS channel enabled; it cannot be used against the endpoints of other channels.
OAuth 2.0 access token issued by POST /api/oauth/token (client-credentials). Takes precedence over x-api-key when both are sent. See the Authentication section.
Request
Sender mask identifier obtained through GET /v1/sms/masks. Applies to the whole batch.
Default text of the batch. Required when any item of messages does not carry its own text.
Default encoding of the batch (see SendMessageRequest).
INDIVIDUAL: the regular messageStatus webhook per number, with batch_id. BATCH: a single batchStatus webhook for the whole batch.
Response
Batch accepted and queued. Store batch_id and the message_id of each number: they are the keys to correlate the webhooks.
Batch identifier; it comes in the webhooks of the batch.

