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
DELIVERYorREADevent: follow a campaign withGET /campaigns/{id}andGET /campaigns/stats. - One webhook per account: if one is already configured, the call answers
409. Change it withPUT /webhooks/delivery-statusor remove it withDELETE /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
2xxwithin 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(thecustomerMessageIdof the send),destination,eventDate,price,statusCodeand itsdescription. An SMS event also carriestotalPartsandnumPart: 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, andmediaKeyfor 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
statusCode | description | Channels |
|---|---|---|
0 | unknown | All |
2 | rejected | SMS |
3 | delivered | All |
4 | expired | SMS |
5 | deleted | SMS |
6 | undeliverable | SMS |
9 | general error | RCS, WhatsApp |
10 | disabled | RCS, WhatsApp |
11 | unsupported | RCS, WhatsApp |
12 | conversation closed |
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
EXPIREDstatus shows only when you poll it, withGET /messages/status,GET /rcs/messages/{messageId},GET /whatsapp/messages/{messageId}orGET /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
- 201
- 400
- 401
- 409
- 500
Webhook configured.
Invalid body: callbackUrl is missing or malformed, is not HTTPS, uses a port other than 443 or 8443, or its host is not publicly reachable.
The API key is missing, invalid, or lacks the WEBHOOKS operation.
A webhook is already configured. Change it with PUT or remove it with DELETE.
Unexpected server error.