Setup call events webhook url
# support
w
I want to know where I should set the webhook URL that points to my API in order to start receiving call events (call start, call end). Note: we are using squads.
v
To receive call events (like call start and call end), set your webhook URL in your assistant's server configuration. For example, using the API:
Copy code
json
{
  "server": {
    "url": "https://your-api.com/webhook"
  }
}
You can also set this in the Vapi Dashboard under your assistant's "Advanced" tab. This ensures your API receives the relevant call event webhooks. Source: [Setting server URLs documentation](https://docs.vapi.ai/server-url/setting-server-urls)
w
we are using squad, should i set the server url in all our assistants?
c
Hi worming, To set up local webhook testing, you can use the
vapi listen
command in combination with a tunneling service like ngrok. Here's a quick guide: 1. Start your local server: - Ensure your application is running and listening on a port, for example
localhost:3000/webhook
. 2. Create a tunnel: - Use ngrok to expose your localhost to the internet. Run:
Copy code
bash
     ngrok http 4242
- Note the public URL provided by ngrok (e.g.,
https://abc123.ngrok.io
). 3. Start the webhook listener: - Open a new terminal and execute:
Copy code
bash
     vapi listen --forward-to localhost:3000/webhook
4. Update your Vapi dashboard: - Set your webhook URLs in the Vapi dashboard to the ngrok public URL. 5. Test: - Trigger webhook events in your applications or Vapi console to see them routed to your local server through the tunnel. Remember that
vapi listen
does not create a tunnel on its own, so ensure the tunneling service is running. For [detailed information, refer here](https://docs.vapi.ai/cli/webhook).
w
I don't need to use a tunnel... it is mandatory to use vapi CLI to set up the webhook? I'm asking because I don't see any option in the portal to do it
c
No, you wont need to use vapi CLI to accomplish this, but instead you’ll need to add the webhook URL to each assistant in your squad. This ensures every assistant can send call event webhooks properly to your API.
w
i need to catch call-started and call-ended events... what events should i check to acomplish that?
c
To capture when calls start and end, you’ll want to handle the following webhook events sent from Vapi to your server: Key Webhook Events 1.
status-update
– Sent when the call status changes (e.g., started, in-progress, ended). - Use this to detect when a call starts or ends. 2.
end-of-call-report
– Sent after the call finishes, containing full details like duration, transcript, and cost. These two events together give you a full picture of the call lifecycle. ---
3 Views