BIND
POSTYour webhook URL

Delivery 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-Secret header. 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 2xx to 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_id and type (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/json
  • typestring
    Values:DLR
  • message_idstring (uuid)

    The request_id you got when the message was accepted.

  • tostring

    Recipient phone number.

  • statusstring

    DELIVERED and UNDELIVERABLE are final: the message is done, and no other channel will be tried. SEEN is a read receipt and is not final; expect it in addition to, not instead of, a final report.

    Values:DELIVEREDSEENUNDELIVERABLE
  • errorstring

    Result code. 000 for DELIVERED and SEEN. On UNDELIVERABLE, why the message was not delivered:

    code meaning
    001 The recipient has no account on this channel.
    5000 Not delivered, for a reason not listed here.
    5001 The recipient is receiving too many messages, or has limited messages from businesses.
    5002 The sending number reached its daily limit.
    5003 The channel refused the content (for example a template that is not approved).
    5004 The channel refused our credentials.
    5005 The sender is not set up correctly on the channel.
    5006 The channel refused the message.
    5007 The channel did not answer or is limiting our requests.
    5008 Your account is out of balance.
    5009 The recipient's number is not valid.
    5010 The destination cannot be reached or is not allowed for your account.
    5011 Your 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 channel is sms, the code is the SMS delivery error code, as on an SMS delivery report.

  • costnumbernullable

    What this attempt actually charged, in your account currency - 0 if the message was never charged (e.g. an UNDELIVERABLE outcome on an account billed per delivery, or a WhatsApp or Viber message refused before it was sent). null when no charge is recorded for the attempt on a DELIVERED or SEEN report, or on an sms UNDELIVERABLE report on an account not billed per delivery. May differ from the cost on the send response, which was only an indicative estimate for the first channel tried.

  • countinteger

    The number of parts cost applies to - more than 1 only for a long SMS. The total is cost * count.

  • channelstring

    The channel this report is about: the one the message was delivered on, or the last one tried. sms when 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.

Bind console showing an SMS profile going live