David VS
05/28/2025, 8:20 PMVapi Support Bot
05/28/2025, 8:22 PMjson
{
"results": [
{
"toolCallId": "<the id from the request>",
"result": "<your message>"
}
]
}
If your response doesn't match this format, the agent won't relay your message.
Could you share the exact JSON response your webhook returns to the agent? This will help pinpoint if the response format is the issue.
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
05/28/2025, 8:22 PMjson
{
"results": [
{
"toolCallId": "<the id from the request>",
"result": "<your message>"
}
]
}
If your response doesn't match this format, the agent won't relay your message.
Could you share the exact JSON response your webhook returns to the agent? This will help pinpoint if the response format is the issue.
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
05/28/2025, 8:23 PM{ "result": "The pizza guy's number is 234. Do you want cheese or pepperoni?" } (as required by Vapi), rather than just a plain message or a different JSON structure?
Source:
- [Vapi Server Events Documentation](https://docs.vapi.ai/server-url/events)Vapi Support Bot
05/28/2025, 8:23 PM{ "result": "The pizza guy's number is 234. Do you want cheese or pepperoni?" } (as required by Vapi), rather than just a plain message or a different JSON structure?
Source:
- [Vapi Server Events Documentation](https://docs.vapi.ai/server-url/events)Vapi Support Bot
05/28/2025, 8:23 PMjson
{
"messageResponse": {
"message": "The pizza guy's number is 234. Do you want cheese or pepperoni?"
}
}
Update your webhook to return this structure, not just a plain string. This should allow the agent to use your custom message as intended.
Source:
- [Vapi Webhook Server Message Documentation](https://docs.vapi.ai/api-reference/webhooks/server-message?explorer=true)Vapi Support Bot
05/28/2025, 8:23 PMjson
{
"messageResponse": {
"message": "The pizza guy's number is 234. Do you want cheese or pepperoni?"
}
}
Update your webhook to return this structure, not just a plain string. This should allow the agent to use your custom message as intended.
Source:
- [Vapi Webhook Server Message Documentation](https://docs.vapi.ai/api-reference/webhooks/server-message?explorer=true)David VS
05/28/2025, 8:24 PMVapi Support Bot
05/28/2025, 8:24 PMVapi Support Bot
05/28/2025, 8:24 PMVapi Support Bot
05/28/2025, 8:26 PMtoolCallId and parameters are being received as expected.
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
05/28/2025, 8:26 PMtoolCallId and parameters are being received as expected.
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
05/28/2025, 8:28 PMtoolCallId is present and matches the tool call in your Vapi logs. This will help ensure the response is correctly mapped to the tool call.
python
body = await request.json()
print(body) # Add this line for debugging
If the toolCallId is missing or mismatched, the agent may ignore the response.
[See Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
05/28/2025, 8:28 PMtoolCallId is present and matches the tool call in your Vapi logs. This will help ensure the response is correctly mapped to the tool call.
python
body = await request.json()
print(body) # Add this line for debugging
If the toolCallId is missing or mismatched, the agent may ignore the response.
[See Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)David VS
05/28/2025, 8:29 PMVapi Support Bot
05/28/2025, 8:31 PMVapi Support Bot
05/28/2025, 8:31 PMVapi Support Bot
05/28/2025, 8:31 PMtype parameter in the Vapi dashboard to ensure the agent always sends it to your webhook. This helps prevent parameter mismatches and ensures your webhook receives the expected data. After updating, test again and log the incoming request to confirm the parameter is present:
python
body = await request.json()
print(body) # Check if 'type' is included
[See Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
05/28/2025, 8:31 PMtype parameter in the Vapi dashboard to ensure the agent always sends it to your webhook. This helps prevent parameter mismatches and ensures your webhook receives the expected data. After updating, test again and log the incoming request to confirm the parameter is present:
python
body = await request.json()
print(body) # Check if 'type' is included
[See Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)
Source:
- [Vapi Custom Tools documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)David VS
05/28/2025, 8:32 PMVapi Support Bot
05/28/2025, 8:34 PMVapi Support Bot
05/28/2025, 8:34 PMDavid VS
05/28/2025, 8:35 PMDavid VS
05/28/2025, 8:42 PMDavid VS
05/28/2025, 8:45 PMDavid VS
05/28/2025, 8:54 PMChiranjeet Mishra
05/29/2025, 11:47 AM