Download OpenAPI specification:Download

Webhooks

Message status updates, events and messages from the Sinch RCS API and user agents, are returned to the client using webhook callbacks. All callbacks are sent to a single HTTP(S) endpoint registered against the Sender Identity. The RCS REST API posts a JSON body to the Webhook URL and requires an HTTP response code in the 2xx range. If no successful response is received then the RCS REST API will either schedule a retry if the error is expected to be temporary or discard the callback if the error seems to be permanent.

NOTE:
The Webhook URL must be pre registered with Sinch. Please contact your Sinch account manager to get your webhook registered.

Updates WebhookWebhook

There are three different categories of update:

  • Status Reports
    Sent every time the status of a sent message changes, such as delivered, read or failed

  • User Agent Messages
    Sent whenever the user agent manually sends a message (text/image/location/etc.) or interacts with sent suggestion chips

  • User Agent Events
    Sent for events generated by the user agent, such as composing

All categories are sent to the same callback url. You can use the type property to distinguish between them.

Request
Security:
BearerAuth
Request Body schema: application/json
One of:

Callback payload when the sent message status changes

type
required
string
Value: "status_report_rcs"
message_id
required
string <uuid> (MessageId) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89...

The Universally Unique Identifier of the Message

at
required
string <RFC3339 UTC "Zulu">

Timestamp of then the status report was created in the Sinch service

required
StatusReportAborted (object) or StatusReportFailed (object) or StatusReportDelivered (object) or StatusReportDisplayed (object)

The status report

Responses
200

The webhook should return a 2xx range status.

Any other error the RCS REST API will either schedule a retry if the error is expected to be temporary or discard the callback if the error seems to be permanent.

Request samples
application/json
{
  • "type": "status_report_rcs",
  • "message_id": "bc6776ee-7bde-4d6e-9c1e-102e87f92520",
  • "at": "2017-10-31T13:06:30Z",
  • "status_report": {
    • "type": "delivered"
    }
}