Setting up a Webhook to Receive Call Statuses

In this section, you will be acquainted with a simplistic Webhook API for you to create Webhook Notifications for your voice calls directly to your API Endpoint.

After you have successfully added a webhook for the Voice application, you will now receive real-time call status updates.

To set up a Webhook

  1. Type the following piece of code.
    curl --location --request POST ''
    --header 'AppsId: 'XXXXXXXXXXXXXX'
    --header 'Content-Type: application/json'
    --data-raw '{
    "url":"insert your webhook endpoint here",
    "basicAuthNeeded": false
    "url":"insert your webhook endpoint here",
    "basicAuthNeeded": false,
    "username":"XX",  //optional
    "password":"XXX". //optional
  1. If basicAuthNeeded is true, the username and password must be included. Otherwise, feel free to omit it.


Now your webhook has been added to our internal systems.

  1. Sample of payload sent to you for an update in call status
"applicationId": " XXXXXXXXXXXX",
 "parentCallSid": null,
 "from": "+966XXXXXX",
 "to": "+966XXXXXX",
 "duration": 6,
 "direction": "OUTBOUND",
 "status": "COMPLETED",
 "timestamp": 1638192471,
 "receivedAt": 1638192473.287809,
 "useCase": "AUDIO_URL",
 "referenceId": "29389283923", //defined by customer