Skip to navigation

Send batch

Sends the same message type to up to 250 recipients in a single request. The send is asynchronous: the API validates the request, responds 202 Accepted immediately with a batch_id and one message_id per recipient (in the order of the request), and sends the messages in the background. Each recipient’s result is notified through webhooks.

Only type (and the optional delivery settings) goes at the root; each item of messages carries the recipient (to) and the content of that type, with the same shape as POST /v1/whatsapp/messages. Validation is atomic: if any recipient is invalid the whole request is rejected and no message is sent. Per-number rules (format, numbering plan, operator output) are checked in the background and reported per recipient as INVALID_FORMAT, INVALID_SOURCE or OUTPUT_NOT_FOUND.

Limits: 250 recipients, 10 distinct templates (errorCode 577) and 50 distinct media URLs (errorCode 576) per batch; a media URL pointing to a private, loopback, link-local or cloud-metadata address is rejected with errorCode 575. A batch counts as a single request for the rate limit.

webhook_mode selects the notifications: INDIVIDUAL (default) sends the regular status webhook per recipient, with an extra batch_id; BATCH sends a single batchStatus webhook with the result of every recipient.

Authentication

x-api-keystring
Account authentication key.
OR
AuthorizationBearer

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

This endpoint expects an object.
typeenumRequired
Message type of the whole batch.
messageslist of objectsRequired
webhook_modeenumOptionalDefaults to INDIVIDUAL

INDIVIDUAL: the regular status webhook per recipient, with batch_id. BATCH: a single batchStatus webhook for the whole batch.

Allowed values:
fallbackobjectOptional

Default SMS fallback for every recipient that does not carry its own. A per-recipient fallback replaces this one entirely.

Response

Batch accepted and queued. Store batch_id and each recipient’s message_id: they correlate the webhooks.

statusCodeintegerOptional
message"ACCEPTED"Optional
batch_idstringOptional
Batch identifier.
webhook_modeenumOptional
Allowed values:
totalintegerOptional
Recipients received.
messageslist of objectsOptional
One entry per recipient, in the order of the request.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
429
Too Many Requests Error
500
Internal Server Error