aizee_29672
11/04/2025, 5:28 AMAI Evy
11/04/2025, 5:28 AMAI Evy
11/04/2025, 5:28 AMPOST the payload to your endpoint [(3) ]() [(1) ]() .
2. Check your endpoint configuration. Here's the correct setup:
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() ;
}) ;
[(2) ]()
3. Ensure you're using express.json() middleware to parse the JSON body :
javascript
app.use(express.json() ) ;
If you're only receiving GET pings, this might be health checks or verification pings from Retell AI, but the actual webhook events should arrive as POST requests with JSON bodies. Double-check that your webhook URL is correctly registered in your Retell AI dashboard and that your server is properly configured to handle POST requests.AI Evy
11/04/2025, 5:28 AMAI Evy
11/04/2025, 5:28 AMaizee_29672
11/04/2025, 5:38 AMAI Evy
11/04/2025, 5:38 AMAI Evy
11/04/2025, 5:38 AMAI Evy
11/04/2025, 5:38 AMAI Evy
11/04/2025, 5:38 AM