Sending RCS Messages via API


Send individual RCS messages programmatically, with full control over message type, suggestions, and fallback behavior.

📘

You only need an Agent to send RCS directly through the API — a Sender Service is not required unless you want automatic SMS fallback. See RCS Agents.

Send a message

POST /rcs/agents/{agentId}/messages/send

Full request and response reference: Send RCS message

ParameterDescription
agentIdThe Agent to send from (path parameter)
toRecipient number in E.164 format, without the leading +
messageThe message content — see Supported RCS message types for text, standaloneRichCard, carouselRichCard, and file
suggestionsOptional suggested replies or actions, see below
expireAfterOptional. Stop attempting delivery after this many minutes
revokeOptional. If true, revoke the message once it expires without being delivered
fallbackOptional. Automatic SMS fallback, see below

Suggestions

Suggestions appear as tappable chips under your message. Each message can include up to 4.

Suggested reply — sends a predefined reply back to your Agent when tapped.

FieldDescription
typereply
textVisible text of the chip, max 25 characters
postbackDataData your Agent receives when the reply is tapped, max 65 characters

Suggested action — triggers an action on the recipient's device when tapped.

FieldDescription
typeaction
textVisible text of the chip, max 25 characters
postbackDataData your Agent receives when the action is tapped, max 2048 characters
actionOne of the action types below
ActionDescription
dialActionOpens the recipient's dialer with a phone number pre-filled
viewLocationActionOpens the recipient's default map app at a given latitude/longitude, with an optional label
createCalendarEventActionOpens the recipient's calendar app with a new event pre-filled (start time, end time, title, description)
openUrlActionOpens the recipient's browser at a given URL

Message traffic type

Every message carries a messageTrafficType, which tells the carrier what kind of message it is:

ValueUse for
AUTHENTICATIONOne-time passcodes and login verification
TRANSACTIONOrder confirmations, delivery updates, and similar
PROMOTIONMarketing and promotional content (default)
SERVICEREQUESTCustomer service replies
ACKNOWLEDGEMENTConfirmation that a previous message or action was received

Automatic SMS fallback

To fall back to SMS when RCS delivery isn't possible, include a fallback object with a senderServiceId and the SMS body to send instead, plus an optional type for SMS encoding (text, unicode, or auto, default text). See RCS to SMS Fallback for how fallback is triggered and how the Sender Service is used.

Typing and read events

You can send typing indicators or read receipts to a recipient from your Agent:

POST /rcs/agents/{agentId}/events

Full request and response reference: Send RCS events

This lets the recipient see your Agent is "typing…" or has read their message, the same way they would in a conversation with a contact.

Revoking a message

If a message was sent by mistake or is no longer relevant, you can revoke it before it's read:

DELETE /rcs/agents/{agentId}/messages/{messageId}

What's next



Did this page help you?