K Rudy
01/30/2026, 8:11 PMAI Evy
01/30/2026, 8:12 PMAI Evy
01/30/2026, 8:12 PMPOST request to your configured endpoint with the event payload. The webhook has a 10-second timeout and will retry up to 3 times if no 2xx response is received.
### Request Payload Example
json
{
"event": "call_inbound",
"call_inbound": {
"agent_id": "agent_12345",
"agent_version": 1,
"from_number": "+12137771234",
"to_number": "+12137771235"
}
}
Note: The call/SMS is not yet connected at this point, so no call object or call ID exists in the payload.
### Response Options
Your response can include (all optional) :
- override_agent_id – use a different agent
- override_agent_version – use a specific agent version
- dynamic_variables – set call-specific variables
- metadata – attach custom metadata
- agent_override – override agent settings for this call only
### Common Use Cases
- Filter and reject unwanted inbound calls/SMS
- Add context (dynamic variables, metadata) to calls
- Override agent ID or settings per call
- Internal system records of inbound activity
### What Happens If the Webhook Fails?
If all retry attempts fail, Retell checks if the number has an inbound agent ID set—if so, it connects to that agent; otherwise, it disconnects the call.AI Evy
01/30/2026, 8:12 PMAI Evy
01/30/2026, 8:12 PMK Rudy
01/30/2026, 8:13 PMAI Evy
01/30/2026, 8:13 PMAI Evy
01/30/2026, 8:13 PMretell_llm_dynamic_variables field contains the dynamic variables that were passed at the start of the conversation. [(1) ]()
When you retrieve call details using the List Calls API, the response includes:
javascript
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
}
Additionally, there's a collected_dynamic_variables field that shows dynamic variables collected during the call, available after the call ends.
javascript
"collected_dynamic_variables": {
"last_node_name": "Test node"
}
You can also see these variables in the call_started webhook event, which includes the dynamic variables passed using the inbound webhook. [(2) ]()AI Evy
01/30/2026, 8:13 PMAI Evy
01/30/2026, 8:13 PMK Rudy
01/30/2026, 8:14 PMK Rudy
01/30/2026, 8:15 PMAI Evy
01/30/2026, 8:15 PMAI Evy
01/30/2026, 8:15 PMdynamic_variables field nested under `call_inbound`:
[(1) ]()
json
{
"call_inbound": {
"dynamic_variables": {
"first_name": "John",
"email": "john@example.com"
}
}
}
2. All Values Must Be Strings – A common issue is passing non-string values. For example, passing false (boolean) instead of "false" (string) will cause variables not to be passed to the call.
[(2) ]() , [(3) ]()
3. Reference Variables in Your Prompt – To use the variables in your agent, reference them with double curly braces like {{first_name}} or {{email}} in your prompts, begin message, or tool configurations.
, [(4) ]()
4. Check the Webhook URL Location – Make sure your inbound webhook URL is set at the phone number level (via the inbound_webhook_url field on the phone number configuration) .
[(5) ]() , [(6) ]()
If variables still aren't appearing, verify your webhook is actually being called and returning a 2xx status with the correct JSON structure.AI Evy
01/30/2026, 8:15 PMAI Evy
01/30/2026, 8:15 PMAI Evy
01/30/2026, 8:25 PMK Rudy
01/30/2026, 8:25 PMAI Evy
01/30/2026, 8:26 PM{{fist_name}} — make sure the variable name in your prompt exactly matches what you're sending. If you're sending first_name, the prompt must use {{first_name}} (not {{fist_name}}) . [(1) ]()
2. Handling Missing Variables
When a dynamic variable has no assigned value, it remains in its raw form with curly braces intact. For example:
- Prompt: "Hello {{user_name}}, how can I help you today?"
- If user_name is not provided: "Hello {{user_name}}, how can I help you today?"
- If user_name is "John": "Hello John, how can I help you today?"
3. Where Dynamic Variables Work
Dynamic variables can be used in:
- Prompts (agent instructions and personality)
- Begin message (opening greeting)
- Tool configurations (custom function URLs, tool descriptions, property descriptions)
- Call handling (voicemail prompts, transfer call phone numbers, warm transfer instructions)
- Webhook URL
4. Check Variable Existence in Prompts
You can add conditional logic in your prompt to handle unset variables:
If {{user_name}} appears with curly braces, use a generic greeting.
Otherwise, greet the customer by name.
5. Test in LLM Playground
Before deploying, test your dynamic variables using the web interface to confirm they're being substituted correctly.
Double-check that the exact variable name (case-sensitive, no typos) matches between your webhook response and your prompt references.AI Evy
01/30/2026, 8:26 PMAI Evy
01/30/2026, 8:26 PM