Need to send some metadata in `Create Call` Payloa...
# support
y
I need to send some metadata in my
Create 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.
@User Can you help me?
v
@Yash Absolutely, including metadata in your
Create 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:
Copy code
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.
You can continue this conversation by mentioning me in the message.
s
@Yash do let me know if you require further help.
Copy code
curl -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"
    }
  }
}'
9 Views