https://retellai.com/?utm_source=discord&utm_medium=seo logo
where I can configure sending data post call on a ...
# ❓・ai-evy-support
m
@AI Evy where I can configure sending data post call on a webhook
a
Thanks for tagging me @maliawan.. I'll look through relevant sources and get back to you shortly.
### Answer To configure sending post-call data via webhook in Retell AI, you need to set up webhook endpoints for the relevant event types [(1) ]() . Retell AI supports three webhook event types : -
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 For post-call data, you'll primarily use the
call_analyzed
webhook, which includes the full call data including the
call_analysis
object . Here's how to set up your webhook endpoint [(2) ]() :
Copy code
javascript
// install the sdk: <https://docs.retellai.com/get-started/sdk>
import { Retell } from "retell-sdk";
import express, { Request, Response } from "express";
const app = express() ;
app.use(express.json() ) ;
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() ;
}) ;
The webhook payload for
call_analyzed
events includes [(3) ]() :
Copy code
json
{
 "event_type": "call_analysis",
 "call_analysis": {
 // Analysis results object
 }
}
To complete the setup, you'll need to register your webhook URL with Retell AI and ensure your endpoint can handle POST requests with a 10-second timeout [(1) ]() .
​ 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) [[3] Consume the analysis data](https://docs.retellai.com/features/post-call-analysis-consumption) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.