Awezome
09/04/2025, 11:18 AMVapi Support Bot
09/04/2025, 11:19 AMbuy_car function via the apiRequest tool, inspect the payload your service receives—look for the call object, which typically includes an assistantId field. For example:
json
{
"message": {
"type": "function-call",
"call": {
"assistantId": "your-assistant-id-here",
// ...other call details
},
// ...other message fields
}
}
Use call.assistantId in your handler to identify the calling assistant.
Reference: [Outbound Sales Example – Handle function calls](https://docs.vapi.ai/examples/outbound-sales#handle-function-calls)
Source:
- [Outbound Sales Example – Handle function calls](https://docs.vapi.ai/examples/outbound-sales#handle-function-calls)Vapi Support Bot
09/04/2025, 11:19 AMbuy_car function via the apiRequest tool, inspect the incoming payload for an assistant identifier.
Typically, the payload sent to your server includes a call object, which may contain an assistantId or related property. Here’s an example of how you might extract it in Node.js:
js
const assistantId = req.body?.message?.call?.assistantId;
console.log('Assistant ID:', assistantId);
Note: The documentation does not explicitly confirm that assistantId is always present in the function-call payload. If you do not see it, you may need to include it in your assistant's configuration or contact Vapi support for further guidance.
[See reference](https://docs.vapi.ai/server-url/events)
Source:
- [Server Events Vapi Documentation](https://docs.vapi.ai/server-url/events)