Every time you send out a message ( SMS, Viber, etc) from Messente, it will give you a unique Message-ID for this message.
Later this enables you to know about the delivery status of this message using the Delivery Report Webhook.
What is a Webhook
Webhooks are "user-defined HTTP callbacks". They are usually triggered by some event, such as pushing code to a repository or a comment being posted to a blog. When that event occurs, the source site makes an HTTP request to the URL configured for the webhook. Users can configure them to cause events on one site to invoke behavior on another.
Example response from Omnimessage API when sending an SMS:
{
"messages": [
{
"channel": "sms",
"message_id": "fr593ce7-68de-5e44-bc50-044a3ad0a7fa",
"sender": "CoffeeShop"
}
],
"omnimessage_id": "632c6f3d-49d0-4a8f-5k2n-74023d31e51d",
"to": "+4400000000"
}
In this example, the SMS has unique Message-ID of fr593ce7-68de-5e44-bc50-044a3ad0a7fa.
Whenever Messente receives a Delivery Report for this message, it will make an HTTP POST callback request to your server, indicating the new status for this message. For example, the response might indicate that it was successfully Delivered:
{
"status": "DELIVRD",
"sender": "MySender",
"err": 0,
"message_id": "fr593ce7-68de-5e44-bc50-044a3ad0a7fa",
"to": "+3725555555",
"channel": "sms",
"error": null,
"omnimessage_id": "632c6f3d-49d0-4a8f-5k2n-74023d31e51d",
"timestamp": "2020-02-04T08:09:42.389630"
}
What Messente needs to know, however, is where to make this request - this is where the Webhook comes into play.
You can either define the default Delivery Report Webhook for your HTTP API key or set it using dlr_url parameter in the Omnichannel API request.