Skip to navigation

Batch status

Sent once per batch when the batch was created with webhook_mode: BATCH, after every number has a send result (usually 1 to 2 minutes after the request). If a number is still pending after 30 minutes, the webhook is sent anyway with that number as QUEUED_PROVIDER.

Any status change of a number after this webhook (for example, a FAILED reported later by the operator, or a number that was still pending) is notified through the regular messageStatus webhook with batch_id; keep the most recent datetime of each message_id.

A batch that could not be processed is notified with status: FAILED in any webhook_mode. It is delivered to the same destinations and with the same retries as the messageStatus webhook.

Payload

The payload of this webhook request is an object.
type"BATCH"Optional

Distinguishes this webhook from the per-message one.

batch_idstringOptional

The same batch_id returned in the 202 response.

statusenumOptional
Allowed values:
datetimedatetimeOptional
Timestamp of the webhook, in UTC.
totalintegerOptional
Numbers received in the batch.
summarymap from strings to integersOptional

Number of messages per status (COMPLETED only).

messageslist of objectsOptional
Status of each number, in the order of the request.
errorstringOptional

Reason of the failure (FAILED only).

unprocessedlist of stringsOptional

message_id of the numbers that were never processed (FAILED only).

Response

200
Event received and processed by the client.