alisaochka
09/09/2025, 11:29 AMAI Evy
09/09/2025, 11:29 AMAI Evy
09/09/2025, 11:29 AMAI Evy
09/09/2025, 11:29 AMcall_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
Webhooks allow your AI voice agents to take real-world actions and integrate with other systems in real-time [(2) ]() . When specific events happen during a call, your AI agent can trigger a webhook to notify another application and pass along relevant data .
The webhook system uses HTTP POST requests with a 10-second timeout and will retry up to 3 times if no success status (2xx) is received [(1) ]() . Webhooks are triggered in order but are non-blocking - for example, if the call_started webhook fails, the call_ended webhook can still be triggered .
For security, Retell AI includes an x-retell-signature header in webhook requests that allows you to verify the authenticity of the request [(3) ]() .AI Evy
09/09/2025, 11:29 AMAI Evy
09/09/2025, 11:36 AMalisaochka
09/09/2025, 11:37 AMAI Evy
09/09/2025, 11:37 AMAI Evy
09/09/2025, 11:37 AMjson
{
"call_inbound": {
"override_agent_id": "agent_12345",
"override_agent_version": 1,
"dynamic_variables": {
"customer_name": "John Doe"
},
"metadata": {
"random_id": "12345"
}
}
}
For Outbound Calls:
You can pass dynamic variables directly when creating the call using the retell_llm_dynamic_variables parameter [(3) ]() . For outbound calls, since your application already knows the number it's calling, you can fetch the required details and pass them in the create phone call API .
For Web Calls:
You can include dynamic variables when creating a web call [(2) ]() :
json
{ "customer_name": "John Doe" }
Dynamic variables are key-value pairs of strings that inject into your Response Engine prompt and tool description . They allow you to personalize conversations based on caller information or other contextual data [(1) ]() .AI Evy
09/09/2025, 11:37 AMAI Evy
09/09/2025, 11:37 AMalisaochka
09/09/2025, 11:40 AMAI Evy
09/09/2025, 11:40 AMAI Evy
09/09/2025, 11:40 AMAI Evy
09/09/2025, 11:41 AMcall_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
However, if you need to interact with external systems during a call, you should use custom functions (also called tool calling) instead [(2) ]() . Custom functions allow the AI agent to call external APIs and retrieve data in real-time during the conversation .
As one community member explained: "you'll have a list-products custom function, and when posting it, format it using the json parameters, the llm will know where it grabbed the data from" . The function can be called whenever needed during the call based on the conversation flow .
This approach allows you to:
- Search for available products during the call
- Match leads to specific products based on their responses
- Get real-time data and inject it as variables during the conversation
So while mid-call webhooks aren't supported, custom functions provide the real-time integration capabilities you're likely looking for during active calls .AI Evy
09/09/2025, 11:41 AM