Yash
11/22/2024, 1:13 PMCreate Call payload, so that when I receive the end-call-report I can use the same metadata fields on my server and process the webhook request.Yash
11/22/2024, 1:14 PMVapi
11/22/2024, 1:16 PMCreate Call payload is a great way to track and process calls consistently. When you create a call using VAPI, you can include a metadata object in your payload. This metadata will then be sent back to you in the end-call-report, allowing you to identify and process the call on your server.
Here's an example of how you might include metadata in your Create Call payload:
json
{
"to": "phone_number_to_call",
"from": "your_vapi_number",
"ncco": [
{
"action": "talk",
"text": "This is a test call from VAPI"
}
],
"metadata": {
"customer_id": "12345",
"order_id": "98765"
}
}
Replace phone_number_to_call with the actual phone number you want to call, your_vapi_number with your VAPI number, and the metadata object with the actual data you want to include.
Would you like to proceed with creating a call with specific metadata? If so, please provide the necessary details such as the phone number to call, your VAPI number, and the metadata you wish to include.Vapi
11/22/2024, 1:16 PMShubham Bajaj
11/23/2024, 3:11 PMcurl -X POST https://api.vapi.ai/call \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"assistantId": "",
"assistantOverrides": {
"metadata": {
"insert-key-here": "insert-value-here"
}
}
}'