# 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](/messages/list-inbox-conversations) conversation (platform `rcs`, keyed by the person's phone number). They fire webhooks, so you never poll.

## Replies

Every inbound message fires [`message.received`](/webhooks/inbox/message-received) with `platform: "rcs"`. 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:

```json
{
  "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`](/webhooks/inbox/message-delivered)
- `message.read` when the person opens it
- [`message.failed`](/webhooks/inbox/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`](/platforms/rcs/sending).

## Related

- [Inbox webhooks](/webhooks/inbox): every event and its payload.
- [Sending](/platforms/rcs/sending): buttons and `postbackData`.