Webhook Response Not Working as Expected – Assista...
# support
m
I'm struggling with an issue related to my webhook response. I followed the official documentation and used the exact same response format, but I'm experiencing inconsistent behavior. Sometimes the webhook appears as "accepted" in the logs, but other times it isn’t. The main issue is that the assistant never says the expected message (e.g., “San Francisco...”). Instead, it always returns an error message, even when the webhook is marked as accepted in the logs. I’ve attached screenshots and included the exact webhook response I’m using below. Could you please help me identify what I’m doing wrong or what might be causing this issue? Thank you so much for your help! https://cdn.discordapp.com/attachments/1349127191220195439/1349127191602139290/image.png?ex=67d1f81c&is=67d0a69c&hm=9959e3b8093d320149b2849f1c29efb22e9594a7919fdc42a0cbb01aa0047de4& https://cdn.discordapp.com/attachments/1349127191220195439/1349127192013050007/image.png?ex=67d1f81c&is=67d0a69c&hm=99b39f116ab092b7399e5c2f28e86635a6766d6132e82bd0b002666c8dc7cea8& https://cdn.discordapp.com/attachments/1349127191220195439/1349127192373628938/image.png?ex=67d1f81c&is=67d0a69c&hm=04c0fbc4f742c58815923443df0ade07d22cc20e19ca5caa30e5c24ec0a7ee51& https://cdn.discordapp.com/attachments/1349127191220195439/1349127192700911617/image.png?ex=67d1f81c&is=67d0a69c&hm=cb0aef3187fc8590d754c261f779c9a16bb534a3f6d4bf2a274c94be1dadf59c& https://cdn.discordapp.com/attachments/1349127191220195439/1349127193216680106/image.png?ex=67d1f81c&is=67d0a69c&hm=c95cb691bdfbf27679cb27f75815429c8b90713a6b18177c98d56dba40631ece& https://cdn.discordapp.com/attachments/1349127191220195439/1349127193615401092/image.png?ex=67d1f81c&is=67d0a69c&hm=c596253437e383686bbe81759b9bb14d549683209de80702a67842bc4c2ec506& https://cdn.discordapp.com/attachments/1349127191220195439/1349127193896288358/image.png?ex=67d1f81c&is=67d0a69c&hm=64d94833c1242bc5ad257cdfc9b87f2d3e1f37688b0c68d76874d4e627dbe4c9&
v
I've looked at your webhook issue and noticed a potential problem in your JSON structure that might explain why your assistant isn't responding as expected 🔍 The key issue appears to be in your webhook response format. In Image 2, you're using
toolCallId
(camelCase), but in Image 4, the logs show
tool_call_id
(snake_case). According to Vapi's documentation, the correct format should be
toolCallId
in camelCase. Here's the exact format Vapi expects:
Copy code
json
{
  "results": [
    {
      "toolCallId": "YOUR_TOOL_CALL_ID",
      "result": "Your result message"
    }
  ]
}
Even though your webhook is returning a 200 status code and shows as "accepted" in some logs, the inconsistent field naming could be causing Vapi to fail when processing the response. Common reasons for this type of issue include: 1. Mismatched
toolCallId
that doesn't match the one sent by Vapi in the initial request 2. Incorrect JSON formatting (camelCase vs snake_case) 3. Content-Type header issues (though yours appears correct with application/json) I recommend updating your webhook to consistently use the camelCase format (
toolCallId
) and ensure it exactly matches the ID provided by Vapi in the request. If the issue persists after making these changes, please share the actual error message your assistant is returning, which would help with further troubleshooting. Sources: - [Discord message about JSON structure](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1341204221826957432) - [Discord message about toolCallId matching](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1325000684231196775) - [Discord message about JSON formatting](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334658296291921920)
m
@Vapi Support Bot are you on the chat?
application/json solved, but same problem
Complete message is empty
k
Hey Milan, can you try removing your tool completed message and trying again?
m
Completed message is empty/deleted and not working
Completed message is empty/deleted and not working
k
Hey! To help track down this issue, could you share: - The call ID This would really help us figure out what went wrong!
3 Views