dan_quill
10/30/2025, 2:35 PM"x-call-id": "{{call.id}}"
Here's a call where I tried this: 019a3588-5dbd-7664-a5b0-6825a1a91fb0, and here's the actual tool call message:
{
"role": "tool_calls",
"time": 1761834733663,
"message": "",
"toolCalls": [
{
"id": "call_Jv4pNjbyt2DmdZF9SUGwQSYq",
"type": "function",
"function": {
"name": "LOCAL-axe-lo-call_axe_server",
"arguments": "{\"order_id\": \"4072\"}"
}
}
],
"secondsFromStart": 8.478
}
I would have expected my server to log the actual call ID rather than the static string {{call.id}}.
Is there a more correct way to do this?
https://cdn.discordapp.com/attachments/1433464292744757411/1433464293424103544/image.png?ex=6904c928&is=690377a8&hm=166f9d30e39bd246ab770ced31cf461af0681b143d675554e032d76d7ec2b527&Vapi Support Bot
10/30/2025, 2:38 PMjs
// Example: Express.js handler
app.post('/your-tool-endpoint', (req, res) => {
const callId = req.body.message?.call?.id;
// Use callId as needed
});
This ensures you always have the correct call ID, as documented in the Vapi Custom Tools guide.
Note: Header variable interpolation for {{call.id}} is not currently supported for apiRequest tools, so extracting from the payload is the recommended approach.
Source:
- [Custom Tools Documentation](https://docs.vapi.ai/tools-calling)dan_quill
10/30/2025, 2:50 PMmessage parameter in the request.body? This is not for a function-type tool (which it looks like you may be referring to), this is an apiRequest-type tool that I have.dan_quill
11/04/2025, 9:34 AM