Receiving
RCS replies, button taps, shared locations and files arrive in the inbox as platform rcs, with message.received, message.delivered, message.read and message.failed webhooks.
When you finish this page you know how everything a person sends back to your agent reaches you. Replies thread into the agent's inbox conversation (platform rcs, keyed by the person's phone number) and fire webhooks, so you never poll.
Replies
Every inbound message fires message.received with platform: "rcs", and the first message of a new thread also fires conversation.started. What the person sent decides what you get:
| They sent | You get |
|---|---|
| Text | text |
A tap on a reply button | text is the button label; metadata.postbackPayload is its postbackData and metadata.postbackTitle its label |
Their location (shareLocation) | metadata.location with latitude and longitude |
| A photo, video or file | attachments with a copy hosted by us |
A button tap, trimmed to the relevant fields:
{
"event": "message.received",
"message": {
"platform": "rcs",
"text": "Change address",
"sender": { "id": "+13125550188", "phoneNumber": "+13125550188" },
"metadata": { "postbackPayload": "change_address_4821", "postbackTitle": "Change address" }
}
}Match on postbackPayload rather than the label: labels are for people and may change, the payload is yours.
Delivery and read receipts
Every message you send reports its outcome as a webhook: message.delivered, message.read when the person opens it, and message.failed with the carrier's error. All carry platform: "rcs". A message that went out through the SMS fallback reports the same way.
Opt-outs
A reply of STOP (or STOPALL, UNSUBSCRIBE, CANCEL, END, QUIT) opts the person out of your agent and marks the conversation; further sends to them are refused with 409. START resubscribes them. Only the person can opt back in.
Replying from the inbox
Reply to an RCS conversation like any other with the inbox messages API or the dashboard. Replies go out as plain RCS text from the agent; send rich content with POST /v1/rcs/messages.
Related
- Inbox webhooks: every event and its payload.
- Sending: buttons and
postbackData.