Skip to navigation

Send batch

Sends the same RCS content (a template or free-form content) to up to 250 recipients in a single request, personalizing each number’s variables. The send is asynchronous: the API responds 202 Accepted immediately with a batch_id and one message_id per number (in the order of the request), and processes the batch in the background; the results arrive through webhooks.

The content and delivery settings (agent_id, type, template_id, text, contentInfo, richCard, suggestions, ttl_message, ttl_events, fallback) go once at the root and apply to the whole batch. Each item of messages carries only its to and its variables. The content validations are the same as the single send (POST /v1/rcs/messages) and run once; if any fails, the batch is rejected and no number is sent.

Per-recipient rules are checked in the background, so an invalid number does not stop the others: it is reported with status INVALID_FORMAT, INVALID_SOURCE or OUTPUT_NOT_FOUND, is not sent and consumes no credits.

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

Authentication

x-api-keystring

Account authentication key. The App-Key must have the RCS channel enabled.

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.
agent_idstringRequired
RCS agent that sends the messages. Applies to the whole batch.
messageslist of objectsRequired
typeenumOptionalDefaults to TEMPLATE

Content type of the batch. See SendMessageRequest.type.

Allowed values:
template_idstringOptional

Required with type: TEMPLATE; forbidden with free-form types.

textstringOptional

Required with type: TEXT (BASIC agents). Supports {{placeholders}}.

contentInfoobjectOptional

Required with type: FILE.

richCardobjectOptional

Required with type: RICH_CARD or CAROUSEL.

suggestionslist of objectsOptional

Message-level chips (not for BASIC agents). Never send postbackData.

ttl_messageintegerOptional1-1440
Minutes to attempt delivery of each message before it expires.
ttl_eventsintegerOptional1-4320
Minutes during which clicks and replies of each message are accepted.
fallbackobjectOptional

Optional SMS fallback for this send: if the RCS message is not delivered (its delivery status webhook reports FAILED or EXPIRED), the API automatically retries the same recipient over SMS with this content. A late FAILED/EXPIRED that the RCS status priority logic already discards (a suppressed downgrade, an out-of-order event) does NOT fire the fallback — only a failure that actually advances the message status does. It fires only once per message and it is a single hop (RCS → SMS, no further cascade). Requires the multichannel fallback to be enabled for the account (errorCode 380/381 otherwise). Applies the same in both sending modes.

webhook_modeenumOptionalDefaults to INDIVIDUAL

INDIVIDUAL: the regular per-number webhooks with batch_id. BATCH: a single batchStatus webhook for the whole batch.

Allowed values:

Response

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

statusCodeintegerOptional
message"ACCEPTED"Optional
batch_idstringOptional

Batch identifier; it comes in every webhook of the batch.

webhook_modeenumOptional
Allowed values:
totalintegerOptional
Numbers received.
messageslist of objectsOptional

One message_id per number, 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