trillhouse
03/14/2025, 3:15 PMhttps://
url and yet it asks us to send a valid https://
or wss://
url.
Can someone please assist us on what is going on here. Not really sure what the issue is.
Status code: 400 Body: { "message": [
"assistantOverrides.server.url must be al valid URL. Hot tip, the protocol should be https:// or wss://, but found https://keyflow-
backend-62hevvkvea-
uc.a.run.app/api/trigger/vapi/webhook" ],
"error": "Bad Request", "statusCode": 400 }.
https://cdn.discordapp.com/attachments/1350125273806536745/1350125274125176842/Screenshot_2025-03-14_at_10.27.11_AM.png?ex=67d599a5&is=67d44825&hm=7e68b86e4c44abc7e530a1bc2946511895e79c58e97b0bf049f339a56a4ff843&Vapi Support Bot
03/14/2025, 3:17 PMhttps://keyflow-
backend-62hevvkvea-
uc.a.run.app/api/trigger/vapi/webhook
This is likely causing the validation error. The URL needs to be a single continuous string without any breaks or special characters.
Try updating your webhook URL to:
https://keyflow-backend-62hevvkvea-uc.a.run.app/api/trigger/vapi/webhook
When configuring webhooks in Vapi, remember:
1. URLs must be publicly accessible
2. Only https://
or wss://
protocols are accepted
3. The server URL follows a specific order of precedence: assistant.server.url
→ phoneNumber.serverUrl
→ org.serverUrl
If you're still experiencing issues after fixing the URL format, you might want to try manually testing your webhook endpoint with a tool like Postman or cURL to verify it's accessible and responding correctly.
Let me know if this helps resolve your issue!
Sources:
- [Accepted protocols and URL formats for configuring webhooks in Vapi](https://docs.vapi.ai/server-url)
- [Common causes of a 400 Bad Request error when Vapi sends a webhook](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343699958874787896)
- [How to troubleshoot and resolve URL validation errors for Vapi webhooks](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336345690393149452)EinNot
03/14/2025, 4:56 PMKyle
03/15/2025, 8:41 PMShubham Bajaj
03/17/2025, 9:01 PMtrillhouse
03/17/2025, 9:04 PMtrillhouse
03/17/2025, 9:17 PMgetCall
API and i got the same 400 error, but I can't see callID
or the failed logs in API logs, so not sure how to get you the callId
trillhouse
03/17/2025, 9:18 PMgetCall
endpoint, I don't have access to callId
. I am curious as to why I can't see any API logs for the API calls I am making in API Logs pagetrillhouse
03/17/2025, 9:23 PM201
as status code on dashboard. However we get a 400 response with the error message I posted in the original post
https://cdn.discordapp.com/attachments/1350125273806536745/1351305013720514621/Screenshot_2025-03-17_at_5.21.49_PM.png?ex=67d9e45d&is=67d892dd&hm=3c187404f7b46d736745d4d732d12b0fe0b44f26498bb5429c9fd657d5968de0&
https://cdn.discordapp.com/attachments/1350125273806536745/1351305013967847455/Screenshot_2025-03-17_at_5.21.45_PM.png?ex=67d9e45d&is=67d892dd&hm=4ad0edb6c82a82b1820352ee0c77218c9d8db47cfe9c109302fa2df8a7240c67&
https://cdn.discordapp.com/attachments/1350125273806536745/1351305014194212985/Screenshot_2025-03-17_at_5.22.52_PM.png?ex=67d9e45d&is=67d892dd&hm=42520bbe8ff8fccb025b06b6c41f9713a73737133c31b02fbaf33f64a647913e&trillhouse
03/17/2025, 9:24 PMtrillhouse
03/17/2025, 9:25 PMtrillhouse
03/18/2025, 1:02 AMShubham Bajaj
03/18/2025, 11:40 PMassistantOverrides.server.url
field.
In your request body, the URL is:
json
"url": " https://keyflow-backend-62hevvkvea-uc.a.run.app/api/trigger/vapi/webhook"
Notice there's a space character at the beginning of the URL, before "https://". The validation is failing because it's expecting a valid URL that starts with either "https://" or "wss://", but instead it's finding " https://" (with a leading space).
To fix this issue, you need to remove the leading space from the URL value in your request, so it should be:
json
"url": "https://keyflow-backend-62hevvkvea-uc.a.run.app/api/trigger/vapi/webhook"
Leading or trailing whitespace in URL fields often causes validation issues like this, especially in JSON payloads where every character is significant.Shubham Bajaj
03/18/2025, 11:41 PMShubham Bajaj
03/18/2025, 11:41 PMtrillhouse
03/19/2025, 7:31 PM