Customer Email through API
# support
z
Hello! I have been using VAPI, and I want to give the Customer Email through API, but I'm not sure how to send custom variables on /call API.
v
@Ze Hello! I'm glad to hear you're using VAPI. To send custom variables such as a customer's email through the
/call
API, you can include them in the metadata object of your request. The metadata object allows you to pass additional information with the call. Here's an example of how you might include a customer email in a metadata object:
Copy code
json
{
  "metadata": {
    "customerEmail": "customer@example.com"
  }
}
You would include this metadata object in your API call to VAPI. If you need the exact code snippet in a specific language like cURL, Python, JavaScript, PHP, Go, or Java, please let me know, and I'll provide you with an example.
You can continue this conversation by mentioning me in the message.
s
@Ze After assigning a server URL to the phone number, Vapi will send a request to your server URL requesting which assistant to use. Along with specifying the assistant, you need to return assistant override parameters containing variable values that will be used during the call.
10 Views