shabzCDS
09/09/2025, 9:43 PMVapi Support Bot
09/09/2025, 9:44 PMjson
{
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"type": "system",
"content": "You are calling leads about their recent inquiry. If you reach voicemail, use the leave_voicemail tool and mention their specific interest."
}
],
"tools": [
{
"type": "voicemail",
"function": {
"name": "leave_voicemail",
"description": "Leave a personalized voicemail message"
},
"messages": [
{
"type": "request-start",
"content": "Hi {{customer_name}}, this is {{agent_name}} from {{company}} following up on your inquiry about {{product_interest}}. I'd love to discuss how we can help. Please call me back at {{callback_number}} or I'll try you again tomorrow. Thanks!"
}
]
}
]
}
}
Double-check for any extra characters after the last bracket. This should resolve the JSON parsing error!shabzCDS
09/09/2025, 9:49 PMshabzCDS
09/10/2025, 10:23 AMVapi Support Bot
09/10/2025, 10:25 AM"tools": [...] to a single "tool": {...} object, like this:
json
{
"model": {
"provider": "openai",
"model": "gpt-4o",
"messages": [
{
"type": "system",
"content": "You are calling leads about their recent inquiry. If you reach voicemail, use the leave_voicemail tool and mention their specific interest."
}
],
"tool": {
"type": "voicemail",
"function": {
"name": "leave_voicemail",
"description": "Leave a personalized voicemail message"
},
"messages": [
{
"type": "request-start",
"content": "Hi {{customer_name}}, this is {{agent_name}} from {{company}} following up on your inquiry about {{product_interest}}. I'd love to discuss how we can help. Please call me back at {{callback_number}} or I'll try you again tomorrow. Thanks!"
}
]
}
}
}
Try this structure and see if the error resolves. If not, double-check the Vapi documentation for the exact schema required for custom tools.
Source:
- [Vapi Assistants API Reference](https://docs.vapi.ai/api-reference/assistants/create?explorer=true)Chiranjeet Mishra
09/11/2025, 7:52 PM