can I get the call id as a variable
# support
j
I want to pass to my API during the workflow the call id of the vapi call. In this way I can connect the two together for auditing later on. Is there an internal variable I can use for this?
c
Hi Jonathan Carter, Yes, you can access the call ID in several ways:** 1. Through Server URL Webhooks: - The call ID is included in webhook events sent to your server URL - Available in the event payload:
Copy code
{
  "type": "call-started",
  "callId": "abc123xyz",
  "timestamp": "2025-09-15T10:00:00Z"
}
2. Using Customer Metadata: - You can pass the call ID in webhook responses using
{{call.id}}
- Include it in your server responses or messages 3. In End-of-Call Reports:
Copy code
{  "message": {    "type": "end-of-call-report",    "call": {      "id": "abc123xyz",      // other call details    }  }}
To use the call ID in your workflow: 1. Configure your server URL to receive webhooks 2. Access the call ID from the event payload 3. Use it in your API calls for auditing
j
Great , but when I call an API during the workflow, how do I then pass that same call.id through so I can tie it back together on my server.
c
In the body of your API request payload, use the dynamic variable
{{call.id}}
to pass it through to your server. Please try using that variable and let us know if you have trouble with it
j
c
Could you please send a call id where it shows as just {{call.id}} as plain text in the logs?
h
Hi Jonathan, did you resolve this? Thank you.
3 Views