Skip to content

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. 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. 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. 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.

POST/messagesSimplified example

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

  1. 14:02DELIVEREDDelivered to the phone
  2. 14:05SEENOpened by the recipient
  3. 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