RCS for developers
Let your own systems send RCS through our REST API. Status and replies from customers come back to you with webhooks.
How the flow works
1. Send
Your system calls the API with the recipient and the content, for example text, a card, a carousel or buttons. If RCS does not get through, you can let it go as an SMS instead.
2. Track status
You get events to your webhook when the message has arrived, when the customer has opened it and when someone taps a button.
3. Receive replies
If the customer taps a suggestion or writes something, that also comes as an event. Your system can then reply in the same thread.
1 Request
{
"sender": "rcsdirekt",
"to": "+46701234567",
"card": {
"title": "Your appointment is booked",
"description": "Tuesday 14 January at 2 pm",
"media": "https://example.com/image.jpg",
"buttons": [
{ "type": "reply", "text": "Confirm" },
{ "type": "reply", "text": "Reschedule" }
]
},
"fallback": { "sms": "Your appointment: Tue 14/1 at 2 pm" }
}2 Reply 202
{ "messageId": "a1b2c3", "status": "ACCEPTED" }3 Events via webhook
- 14:02DELIVEREDDelivered to the phone
- 14:05SEENOpened by the recipient
- 14:06REPLYReplied Confirm
What an integration needs to handle
Webhook events do not always arrive once and in the right order. Here is what usually causes trouble.
- The same event can arrive twice
- Events can arrive in the wrong order
- Put incoming events in a queue
- Check who is calling the webhook
- Keep the API keys secret
- Notice when events stop arriving
Articles about the integration
How do RCS APIs and webhooks work?
An RCS API lets your systems request a message to be sent. Webhooks receive later events such as delivery, read status and customer replies. The API accepting the request does not yet mean the phone has received the message.
2 min readMessage designWhat do Basic, Single and Conversation mean?
Basic, Single and Conversation are message types in business RCS, and they are not subscription plans. They describe different kinds of content and dialogue.
2 min readBusinessWhat does a verified sender mean?
Verification checks the link between the RCS sender and the brand it represents. In Google Messages, the customer can see the company name, logo and a verification mark.
2 min readGoogle's documentation
RCS builds on Google's RCS for Business. To go deeper, everything about messages, events and webhooks is there.