Send an RCS message

Sends an RCS message to one or more recipients. Two mutually-exclusive modes are supported:

  • Template send: pass template_id (from a template created via POST /rcs/templates/*) and no agent_id — the message goes out as the template's agent. Use template_variables to override the placeholders declared on the template at send time.
  • Freeform send: pass message (capped at 306 characters because the same content is reused as the SMS fallback) and agent_id.

Exactly one of template_id or message must be provided. Devices that don't support RCS receive the SMS fallback automatically — taken from the template's fallback_message for template sends, or from message itself for freeform sends.

The endpoint returns 202 Accepted immediately; delivery status arrives later via the configured webhook, as campaign.status events whose status is sent, delivered, read, undelivered, failed or insufficient_credits — the last one when the account's RCS balance did not cover this message at send time (a long Basic message can cost more than one unit): the message was not sent, and that phone gets no other status, not even sent. An SMS fallback reports as campaign.type: "sms" with the same campaign_id, currently only when delivered.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

template_id without agent_id or message: the agent comes from the template.

phones
array of strings
required
length between 1 and 10000

Recipient phone numbers. Accepts national 11-digit, international with +55, or DDI form. At most 10,000 numbers per request: a longer list is a 422. A body over 250 KB, around 15,000 numbers, is refused before that, with a 413.

phones*
uuid

Which registered agent the message goes out as — the brand the recipient sees on the device. It is the id returned by POST /rcs/agents.

Required on a freeform send (message), and refused on a template send (template_id). A template belongs to one agent — the one declared when it was created — and is registered in the supplier project of that agent's line, so a template send always goes out as the template's agent; sending agent_id with template_id returns 422.

On a freeform send it is required even when the app has a single approved agent. It is never inferred from the app: an app may hold more than one agent (one for verification codes, another for offers), and guessing is what would deliver under the wrong brand — a failure that does not show up in a log, only on the recipient's phone.

string
required

Identifier returned by POST /rcs/templates/*. Mutually exclusive with message.

template_variables
array of objects

Override values for the placeholders declared on the template's default_variables. Same array-of-pairs format used by the template-creation endpoints.

template_variables
string
length ≤ 306

Freeform message body for template-less sends. Capped at 306 chars because the same text is reused as the SMS fallback. Mutually exclusive with template_id.

uri
length ≤ 512

Optional. URL that receives the status events (campaign.status) of this send instead of the app's webhook URL, in the same model as the Twilio StatusCallback. It is called exactly as written, query string included, so it can carry your own identifiers (for example ?order=123). Replies and button postbacks keep going to the app's webhook URL. Must use http or https, have a public hostname without underscores and be at most 512 characters; private and reserved addresses are refused. No authentication header is sent to it.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json