Webhook Events Not Sent for API-Created Calls
# support
t
Call ID:
0199bced-4e8d-7ff1-a833-0f8323921b55
Timestamp: Oct 7, 2025 04:28:12 UTC (started) / 04:29:28 UTC (ended) Issue: Webhook events work via web interface but not for API-created calls. Expected: Receive
status-update
and
end-of-call-report
webhooks Actual: No webhook events received despite successful call completion Our Setup:
Copy code
javascript
// Create assistant with webhook config
const assistant = await vapi.assistants.create({
  name: "Vendor Booker",
  model: { provider: "openai", model: "gpt-4o-mini" },
  server: {
    url: "https://server.com/webhook/vapi",
    timeoutSeconds: 20
  },
  serverMessages: ['status-update', 'end-of-call-report', 'function-call']
})

// Create call
const call = await vapi.calls.create({
  assistantId: assistant.id,
  phoneNumberId: "7c5cb32e-2af5-4125-8ffa-4a813d9fef18",
  customer: { number: "+1 5212815714" }
})
What Works: - Call creation/completion via API - Webhook endpoint responds to manual tests - Webhooks work via Vapi web interface What Doesn't: - No webhook events for API calls - Database stuck on
call_status: "queued"
Evidence: - Database:
call_status: "queued"
,
ended_at: null
- Vapi API:
status: "ended"
,
endedAt: "2025-10-07T04:29:28.367Z"
Question: Do dynamic assistants need webhook config at phone number level instead of assistant level?
v
Hey @Tilak I can help you sort this out. From what you shared, it looks like the assistant-level webhook might not always work for API-created calls. Sometimes, for dynamic assistants, the webhook needs to be set up at the phone number level to make sure status-update and end-of-call-report events come through. Can you check if your phone number has its own webhook set up, or is it relying only on the assistant-level webhook? @Tilak
t
Yes phone number webhook is already setup
v
Since the phone number webhook is already set up, it looks like API-created calls might not be picking up that webhook automatically. This can happen sometimes and is why the status-update and end-of-call-report events aren’t coming through. I can help you check the call-to-webhook setup and make sure API calls trigger the events correctly. @Tilak
t
Please help me
v
Sure! Let’s discuss this in more privately so I can help you sort it out. @Tilak
t
Sure
c
Hi Tilak, To set up local webhook testing using Vapi, you'll need to forward webhooks to your local development server utilizing the
vapi listen
command alongside a tunneling service like ngrok. Here's a simple guide you can follow: 1. **Start a Tunnel**: Use ngrok (or a similar service) to create a public URL.
Copy code
bash
   ngrok http 4242  # Replace '4242' with desired port
2. **Run Vapi Listener**: Forward the webhooks to your local server.
Copy code
bash
   vapi listen --forward-to localhost:3000/webhook
3. **Update Webhook URLs**: Go to your Vapi Dashboard and update the webhook URLs to use the ngrok-generated public URL, like: -
https://abc123.ngrok.io
4. **Trigger Webhooks**: Initiate calls or other events from Vapi to see them in real-time. For a more detailed guide, you can refer to the [Local webhook testing](https://docs.vapi.ai/cli/webhook) documentation. Make sure to use secure setups for production and implement proper error handling and live monitoring.
2 Views