johnsonofgreyskull
10/21/2025, 8:53 AMAI Evy
10/21/2025, 8:53 AMAI Evy
10/21/2025, 8:53 AMjavascript
// 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() ;
}) ;
Retell AI supports webhook events like call_started, call_ended, and call_analyzed [(2) ]() . The webhook will POST the payload to your endpoint with a timeout of 10 seconds, and if no success status (2xx) is received, it will be retried up to 3 times .
For account-specific webhook configuration issues, you'll need to contact support directly:
- Visit [Contact Sales]()
- Visit [)
Would you like a general answer based on my knowledge instead?AI Evy
10/21/2025, 8:53 AMAI Evy
10/21/2025, 8:53 AM