Skip to main content

Configure delivery-status webhook

POST 

/api/partner-gateway/webhooks/delivery-status

Registers the HTTPS URL that receives your delivery-status events. One URL serves every channel.

  • What produces events: the messages sent through the SMS, RCS and WhatsApp send APIs, conversation replies included. Campaign messages produce no DELIVERY or READ event: follow a campaign with GET /campaigns/{id} and GET /campaigns/stats.
  • One webhook per account: if one is already configured, the call answers 409. Change it with PUT /webhooks/delivery-status or remove it with DELETE /webhooks/delivery-status. A URL stored with notifications switched off on every channel does not count: this call replaces it.
  • URL rules: HTTPS on port 443 or 8443, no credentials, no fragment, and a host that resolves to public addresses only.
  • Answer 2xx within 5 seconds. Otherwise the event is retried, up to 5 attempts in all, at least 5 minutes apart on SMS and at least 10 on RCS and WhatsApp, for messages sent in the last 10 days.

Process events idempotently. An event can arrive more than once.

Events and their fields

Each event is a JSON object sent with POST: eventType says which kind it is. Fields without a value are left out.

  • DELIVERY (SMS, RCS, WhatsApp), when the delivery receipt arrives: eventType, channel, messageId (the customerMessageId of the send), destination, eventDate, price, statusCode and its description. An SMS event also carries totalParts and numPart: one event per message part.
  • READ (RCS, WhatsApp), when the recipient opens the message: eventType, channel, messageId, destination, eventDate.
  • INBOUND (RCS, WhatsApp), when the recipient writes to you: eventType, channel, messageId (the id of the message in the conversation), source (the recipient's number), destination (your WhatsApp number or RCS agent id), receivedDate, messageType, text, and mediaKey for media.

A message still in flight (accepted on SMS, unknown on RCS and WhatsApp) has no receipt yet and produces no event.

Status codes of a DELIVERY event
statusCodedescriptionChannels
0unknownAll
2rejectedSMS
3deliveredAll
4expiredSMS
5deletedSMS
6undeliverableSMS
9general errorRCS, WhatsApp
10disabledRCS, WhatsApp
11unsupportedRCS, WhatsApp
12conversation closedWhatsApp
  • 1 (accepted) is never sent: an SMS event goes out only once its final receipt arrives.
  • An RCS or WhatsApp message that expires produces no event: its EXPIRED status shows only when you poll it, with GET /messages/status, GET /rcs/messages/{messageId}, GET /whatsapp/messages/{messageId} or GET /messages/history.
  • These are the codes of the Delivery Statuses table in the API overview, and the number the SMS platform's own delivery callback sends as DELIVERY_STATUS.

Request​

Responses​

Webhook configured.