Developers
When you send a message, the API tells you it was accepted and queued. That is only the start of the story. Whether the customer actually received it is reported later, through a webhook.
Queued is not delivered
A phone can be switched off, a number can be wrong, and a network can be slow. If your system treats every accepted message as delivered, you will miss failures that cost you customers.
What to do with delivery events
- Store the batch id and message id when you send.
- Update the message status when a delivery event arrives.
- Retry or switch channel when a message fails.
- Respond to the webhook with a 200 quickly, and do the heavy work in the background.
The best time to learn a message failed is before the customer calls to ask where it is.
Events can arrive more than once, so use the event id to make sure processing the same event twice does no harm.
A
All articlesAvenoLink Team
Product and engineering