manucmt_18551
09/06/2025, 9:26 PMAI Evy
09/06/2025, 9:26 PMAI Evy
09/06/2025, 9:26 PMcall_started, call_ended, and call_analyzed, which are all tied to actual call activities .
For webhook testing, you could consider:
1. Making test calls - The most reliable way to test your webhook endpoints with actual Retell AI webhook payloads
2. Using webhook testing tools - Tools like webhook.site or n8n can help you verify that your endpoint is receiving POST requests correctly [(2) ]()
3. Validating your endpoint setup - Ensure your webhook endpoint returns a successful status code (2xx) as expected by Retell AI [(1) ]()
The webhook has a timeout of 10 seconds and will retry up to 3 times if no success status is received .
If you need to test webhook functionality without making calls, you might want to reach out to Retell AI support for guidance on testing methodologies.AI Evy
09/06/2025, 9:26 PMAI Evy
09/06/2025, 9:26 PMmanucmt_18551
09/06/2025, 9:34 PMAI Evy
09/06/2025, 9:34 PMAI Evy
09/06/2025, 9:34 PMjavascript
// 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) => {
if (
!Retell.verify(
JSON.stringify(req.body) ,
process.env.RETELL_API_KEY,
req.headers["x-retell-signature"] as string,
)
) {
console.error("Invalid signature") ;
return;
}
const {event, call} = req.body;
// process the webhook
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;
Python Example:
python
valid_signature = retell.verify(
json.dumps(post_data, separators=(",", ":") , ensure_ascii=False) ,
api_key=str(os.environ["RETELL_API_KEY"]) ,
signature=str(request.headers.get("X-Retell-Signature") ) ,
)
if not valid_signature:
print(
"Received Unauthorized",
post_data["event"],
post_data["data"]["call_id"],
)
return JSONResponse(status_code=401, content={"message": "Unauthorized"})
args = post_data["args"]
if args["city"] == "New York":
return JSONResponse(status_code=200, content={"result": "25f and sunny"})
else:
return JSONResponse(status_code=200, content={"result": "20f and cloudy"})AI Evy
09/06/2025, 9:34 PMensure_ascii=False in your JSON dumps to handle special characters properly [(3) ]()
3. Ensure you're using the exact header name x-retell-signature [(1) ]()
4. You can allowlist Retell IP address 100.20.5.228 for additional security [(1) ]() [(2) ]()
The signature verification helps confirm that webhooks genuinely come from Retell AI, not from malicious third parties [(1) ]() .AI Evy
09/06/2025, 9:34 PMAI Evy
09/06/2025, 9:34 PM