Your webhook URLDelivery report for a message you sent
A DeliveryReport, "type": "DLR", POSTed to the webhook set for your API key as soon as the outcome of a message is known. Your webhook also gets replies ("type": "MO", the reply callback), so check type first. Without a webhook you get no delivery reports.
The rules are the same for both kinds of call:
If a webhook secret is set for your API key, every call carries it in the
X-Webhook-Secretheader. Reject a call without it. Compare the whole value: it is the same on every call. Ask us if you need it in a header with another name.Answer with any
2xxto confirm the call. For anything else, or when we cannot connect, we retry with a growing delay for up to two days, then stop. That also covers a secret change: while you deploy the new secret, rejected calls are retried, not lost.We send these calls at a limited rate per API key, which we set for you (20 a second unless agreed otherwise). During a large campaign they may arrive spread out, not all at once.
A call can arrive more than once. Treat a repeat of the same
message_idandtype(and, for a delivery report,status) as already handled.
status and error say what happened, with the error codes listed on DeliveryReport.error. With several channels you get one final report per message, from the channel that delivered it or from the last one tried; Failover in the description of this operation explains it.
Payload
application/jsontypestringValues:DLRmessage_idstring (uuid)The
request_idyou got when the message was accepted.tostringRecipient phone number.
statusstringDELIVEREDandUNDELIVERABLEare final: the message is done, and no other channel will be tried.SEENis a read receipt and is not final; expect it in addition to, not instead of, a final report.Values:DELIVEREDSEENUNDELIVERABLEerrorstringResult code.
000forDELIVEREDandSEEN. OnUNDELIVERABLE, why the message was not delivered:code meaning 001The recipient has no account on this channel. 5000Not delivered, for a reason not listed here. 5001The recipient is receiving too many messages, or has limited messages from businesses. 5002The sending number reached its daily limit. 5003The channel refused the content (for example a template that is not approved). 5004The channel refused our credentials. 5005The sender is not set up correctly on the channel. 5006The channel refused the message. 5007The channel did not answer or is limiting our requests. 5008Your account is out of balance. 5009The recipient's number is not valid. 5010The destination cannot be reached or is not allowed for your account. 5011Your account or product is not active. These codes are the same on every channel except SMS. We may add codes; treat one you do not recognise as not delivered. When
channelissms, the code is the SMS delivery error code, as on an SMS delivery report.costnumbernullableWhat this attempt actually charged, in your account currency -
0if the message was never charged (e.g. anUNDELIVERABLEoutcome on an account billed per delivery, or a WhatsApp or Viber message refused before it was sent).nullwhen no charge is recorded for the attempt on aDELIVEREDorSEENreport, or on ansmsUNDELIVERABLEreport on an account not billed per delivery. May differ from thecoston the send response, which was only an indicative estimate for the first channel tried.countintegerThe number of parts
costapplies to - more than1only for a long SMS. The total iscost * count.channelstringThe channel this report is about: the one the message was delivered on, or the last one tried.
smswhen an SMS fallback delivered the message or was the last to fail.Values:whatsappvibersms
Your answer
Ready to send your first message?
We set up your account, sender profiles and API key with you, and help you through the first integration.

