https://retellai.com/?utm_source=discord&utm_medium=seo logo
t
@AI Evy quick question. For each call I’m getting 3 webhook events (call_started, call_ended, and call_analyzed). I only need call_analyzed, but my webhook service has limited runs and the extra two events waste them. Is there a way to configure Retell to only send the call_analyzed webhook?
a
Thanks for tagging me @thisishamza1. I'll look through relevant sources and get back to you shortly.
### Answer Based on the documentation, Retell AI sends all three webhook events (
call_started
,
call_ended
, and
call_analyzed
) by default [(1) ]() . Unfortunately, the available sources don't show a way to configure the webhook to send only specific event types like
call_analyzed
. The webhook system is designed to send events in order, with each event serving a specific purpose : -
call_started
- triggered when a new call begins -
call_ended
- triggered when a call completes, transfers, or encounters an error -
call_analyzed
- triggered when call analysis is complete Your webhook endpoint receives all events and needs to handle them accordingly. In your webhook handler, you can simply ignore the events you don't need by filtering on the event type [(2) ]() :
Copy code
javascript
app.post("/webhook", (req: Request, res: Response) => {
 const {event, call} = req.body;
 switch (event) {
 case "call_started":
 console.log("Call started event received", call.call_id) ;
 break;
 case "call_ended":
 console.log("Call ended event received", call.call_id) ;
 break;
 case "call_analyzed":
 console.log("Call analyzed event received", call.call_id) ;
 break;
 default:
 console.log("Received an unknown event:", event) ;
 }
 // Acknowledge the receipt of the event
 res.status(204) .send() ;
}) ;
While this doesn't reduce the number of webhook calls, you can process only the
call_analyzed
events and quickly acknowledge the others without performing any resource-intensive operations. For webhook configuration options beyond what's documented, you might want to contact Retell AI support at [Contact Sales]() or check their GitHub at [) .
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[2] Setup guide](https://docs.retellai.com/features/register-webhook) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.