๐Ÿ“”Webhook Payload/Response

The Webhook(s) are detailed below:: The Webhook(s) added must accept a POST request, below is the code example of how and what we send to a webhook

const axios = require('axios');

// Data to be sent in the POST request
const postData = 
         {
            Transcript, //These are the call transcripts
            PhoneNumber,// phone Number of the customer
            CustomerSpecificData, //This will include some additional
            //information of user for example, Email(if you had provided in the contacts)
            Duration, // Duration in mins(ceil value, 23 secs will be shown as 1, 61 secs as 2)
            InformationGathered, //This will the Information that you had mentioned to collect
            //from the conversation when you created the campaign.
            AnswersToQuestion: { // These are the questions, you added during campaign creation
            // in order of their insertion
                 Question1: Q1 },
                 Question2: Q2 },
                 ....
                 ...
            }
        }

// Make a POST request
axios.post('https://{YOUR_WEBHOOK}', postData)
  .then(response => {
   //We expect the webhook to return 200
  })
  .catch(error => {
    // Handle any errors
    console.error('Error posting data:', error);
  });

https://app.voicegenie.ai/

Last updated

Was this helpful?