Webhooks is a mechanism which enables applications to communicate with each other programmatically. It allows you to send real-time data from one application to another whenever a given event occurs.Whenever a specific event occurs, configured app sees the event, collects the data, and immediately sends a notification (user-defined HTTP callbacks) to the webhook URL specified.There are 2 status you can receive via webhooks:1. Delivered: Used to notify you when SMS gets delivered to user.2. Undelivered: Used to notify you when unable to receive SMS by user.Only use asynchronous handling of webhooksDo not process SMS status in the webhook handler. Acknowledge immediately after receiving the webhook (with status 200), then you can process the data.
Recommendations#
For stable functioning of webhook it is recommended to make the webhook perform as fast as possible. That means:Respond with status 200 immediately after receiving a notification (the callbacks payload should NOT be processed before responding, but ack first then process).The maximum tolerable time for webhook response is 2 seconds.
Here we mention different types of webhook responses:#