Prerequisites
- A Telnyx account with an RCS Agent
- A publicly accessible HTTPS endpoint (or ngrok for local development)
- Your API key and public key (for signature verification)
RCS vs SMS/MMS webhooks
RCS webhooks have significant structural differences from SMS/MMS. Understanding these is critical when building a multi-channel messaging application.| Feature | SMS/MMS | RCS |
|---|---|---|
| Message body | payload.text (string) | payload.body.text (nested object) |
| Media format | payload.media[] with Telnyx URLs | payload.body.user_file with GCS URLs |
| Sender identifier | from.phone_number | from.phone_number (inbound) or from.agent_id + from.agent_name (outbound) |
| Recipient identifier | to[].phone_number | to[].phone_number (outbound) or to[].agent_id + to[].agent_name (inbound) |
| Read receipts | Not supported | ✅ message.read event |
| Suggestion responses | Not applicable | ✅ body.suggestion_response |
| Location sharing | Not supported | ✅ body.location |
| JSON schema | Telnyx messaging schema | Snake-case schema based on Google RCS API |
| Webhook URL source | Messaging profile or per-request | RCS Agent config (inbound) + messaging profile (outbound status) |
For SMS/MMS webhook handling, see Receiving Webhooks for Messaging.
Webhook URL configuration
RCS webhook routing differs from SMS/MMS:| Event Type | Webhook Source |
|---|---|
Inbound messages (message.received) | Configured on the RCS Agent |
Outbound status (message.sent, message.finalized, message.read) | Per-request URL → messaging profile URL → none |
URL priority for outbound status
Per-request URLs
If
webhook_url and webhook_failover_url are provided in the send request body, those are used.No webhook
If neither is configured, no webhook is delivered. Events are still logged in Message Detail Records.
Webhook event types
| Event | Description | Direction |
|---|---|---|
message.sent | Message sent to the upstream RCS provider | Outbound |
message.finalized | Delivery confirmed or failed by carrier | Outbound |
message.read | Recipient read the message on their device | Outbound |
message.received | Inbound message received by your RCS Agent | Inbound |
Delivery status webhooks
When you send an RCS message, Telnyx notifies you as the message progresses through each status.Delivery status flow
Status reference
| Status | Description |
|---|---|
queued | Message queued on Telnyx’s side |
sending | Being sent to the upstream RCS provider |
sent | Sent to the upstream provider |
delivered | Carrier confirmed delivery to the device |
read | Message read on the recipient’s device |
sending_failed | Failed to send to the upstream provider |
delivery_failed | Carrier could not deliver to the recipient |
delivery_unconfirmed | No delivery confirmation received |
Example: Delivery receipt payload
Read receipts
RCS uniquely supports read receipts — amessage.read event is sent when the recipient opens and views your message. This is not available with SMS/MMS.
Example: Read receipt payload
Handling read receipts
Use read receipts to:- Track engagement — Know which messages were actually read vs. just delivered
- Trigger follow-ups — Send a follow-up if a message was delivered but not read after a threshold
- Analytics — Calculate read rates for different message types or campaigns
- UI updates — Show “read” indicators in your chat interface (like blue checkmarks)
Inbound message webhooks
When someone sends an RCS message to your agent, Telnyx delivers amessage.received webhook to the URL configured on your RCS Agent.
Inbound message types
RCS supports richer inbound message types than SMS/MMS:- Text
- File/Image
- Location
- Suggestion Response
SDK webhook handling examples
Handle RCS webhooks in your application with proper event routing, signature verification, and message type detection.Building a unified SMS + RCS webhook handler
If your application handles both SMS/MMS and RCS, you need to normalize the different payload structures:Webhook IP allowlist
If your server uses a firewall or ACL, allowlist the Telnyx webhook source subnet:| CIDR | Description |
|---|---|
192.76.120.192/27 | Telnyx webhook delivery IPs |
Best practices
Respond quickly — return 2xx within 2 seconds
Respond quickly — return 2xx within 2 seconds
Process webhooks asynchronously. Acknowledge receipt immediately and handle the event in a background job. If your server doesn’t respond within 2 seconds, Telnyx retries the webhook.
Handle retries idempotently
Handle retries idempotently
The same webhook may be delivered multiple times (up to 3 attempts). Use the
event.data.id as a deduplication key to avoid processing the same event twice.Verify webhook signatures
Verify webhook signatures
Validate the
telnyx-signature-ed25519 and telnyx-timestamp headers using your account’s public key. See webhook security for implementation details.Implement SMS fallback for delivery failures
Implement SMS fallback for delivery failures
When an RCS message fails (
delivery_failed status), automatically fall back to SMS to ensure message delivery. Check the to[].status field in message.finalized events.Use read receipts strategically
Use read receipts strategically
Read receipts provide valuable engagement data but aren’t guaranteed. Don’t make critical business logic dependent on receiving a
message.read event — some users disable read receipts.