The Engage Webhook API is a tool that allows you to receive real-time notifications about events related to changes in the status of messages in Engage. It helps users stay updated on the status of their messages and track each delivery, and can apply actions based on the information received.
When a message changes status, for example from "sent" to "received", the API will notify the webhook URL you set up. The notification will contain relevant information about the message, such as its ID and the new status.
Example of message body sent by the API when changing the message status:
{
"message_id": "wamid.HBgMMzU5ODg0NjE4MTgAERgSTMwMTQ5ODY1NTFERUY0AA==",
"message_status": "delivered",
"channel": {
"channel_type": "Whatsapp",
"name": "Channel Name",
"sender_id": "Channel sender id value" // sender’s phone number
},
"campaign": {
"id": "074116ff-76f3-47b7-8be2-92f465718a3e",
"name": "campaign name"
},
"event_name": "msg_status",
"event_timestamp": "1687548944",
"recipient": {
"id": "541112341234" // recipient’s phone number
}
}
</code>
* The statuses available in the Engage Webhook API will be observed in the msg_status item and are: sent, delivered, read and error.
You can request the subscription to message status webhooks through a ticket in the Aivo support center.
Within the ticket you must indicate 
- The outgoing phone number you wish to subscribe to.
- Whether you need to receive One-time or Recurrent campaign message status notifications for that number.
- The URL of your service that will receive the webhooks.
- If you have any authentication headers, type the header name.
- The corresponding value. E.g.: "x-auth-token", "kjhasdc8a7dsckjabdckjabdckasdyc8".