https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do i set up my inbound call webhook response
# ❓・ai-evy-support
y
@AI Evy how do i set up my inbound call webhook response?
a
Thanks for tagging me @yoavbg. I'll look through relevant sources and get back to you shortly.
### Answer To set up your inbound call webhook response, your endpoint needs to return a JSON response with a successful status code (2xx) . [(1) ]() ## Response Format The response fields should be grouped under
call_inbound
. All fields are optional: - `override_agent_id`: override the agent for this call - `override_agent_version`: override the agent version - `dynamic_variables`: set dynamic variables for the call - `metadata`: set metadata for the call - `agent_override`: override agent settings per-call ## Example Response
Copy code
json
{
  "call_inbound": {
    "override_agent_id": "agent_12345",
    "override_agent_version": 1,
    "dynamic_variables": {
      "customer_name": "John Doe"
    },
    "metadata": {
      "random_id": "12345"
    }
  }
}
## Setup Steps 1. Set the
inbound_webhook_url
on your phone number configuration [(2) ]() , [(3) ]() 2. Your webhook endpoint must respond within 10 seconds with a 2xx status [(1) ]() 3. If the webhook fails, it retries up to 3 times To reject an inbound call, respond with a 200 status code without the
override_agent_id
field. Note: The inbound webhook is configured at the phone number level, not the agent level. [(7) ]()
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) [[3] Update Phone Number](https://docs.retellai.com/api-references/update-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
y
@AI Evy here is my response format. Why is it not working: { "call_inbound": { "dynamic_variables": { "status": "{{201.statusCharacter}}", "customer_id": "{{201.id}}", "customer_name": "{{201.firstName}} {{201.lastName}}", "address": "{{201.address.formattedAddress}}", "net_balance": "{{201.netBalance}}", "prepay_balance": "{{201.prepayBalance}}", "remit_balance": "{{201.remitBalance}}", "last_payment_date": "{{201.lastPaymentDate}}", "programs_they_are_on": "{{205.text}}", "customer_type": "customer is a returning customer" } } }
a
Thanks for the follow-up, @yoavbg. I'll get back to you soon.
### Answer Your JSON structure looks correct. The issue is likely that the values like
{{201.statusCharacter}}
are template placeholders from your automation tool (like Make or N8N) that need to be resolved to actual string values before being sent to Retell. [(1) ]() All values in dynamic variables must be **strings**—numbers, booleans, or other data types are not supported. [(2) ]() Checklist: 1. **Ensure placeholders are resolved**: Your automation tool should replace
{{201.statusCharacter}}
with the actual value (e.g.,
"active"
) before sending the response to Retell. 2. **Verify response timing**: The webhook has a timeout of 10 seconds. If no success status (2xx) is received within that time, it will retry. [(1) ]() 3. **Check your automation logs**: Confirm the actual JSON being sent has resolved values, not the raw template syntax. Example of what Retell should receive:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "status": "active",
      "customer_id": "12345",
      "customer_name": "John Doe"
    }
  }
}
, [(3) ]() , [(4) ]() If your automation tool is sending the literal
{{201.statusCharacter}}
text instead of resolved values, the agent will receive those as the actual variable values.
​ To learn more, see the sources I considered: [[1] Inbound webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] inbound webhook](https://discord.com/channels/1186424376300679209/1352358246371037276) [[4] Not receiving response from inbound webhook.](https://discord.com/channels/1186424376300679209/1355901739244585132) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
y
@AI Evy it is actual values but the agent is not receiving them as dynamic variables it is just receiving it as one big bulk of text
a
Thanks for the follow-up, @yoavbg. I'll get back to you soon.
### Answer Based on similar issues reported by other users, the problem may be with how the response is structured. [(1) ]() Try changing your response format to explicitly nest
dynamic_variables
under
call_inbound
like this:
Copy code
json
{
  "call_inbound": {
    "dynamic_variables": {
      "status": "active",
      "customer_id": "12345",
      "customer_name": "John Doe"
    }
  }
}
One user reported that using
retell_llm_dynamic_variables
was not setting the variables correctly, and what fixed it was using the
call_inbound.dynamic_variables
structure instead. To verify the variables are being received: 1. Add one of your dynamic variables to the begin message (e.g.,
"Hello {{customer_name}}"
) to confirm the agent is receiving them. [(2) ]() 2. If it works in the begin message but not in the prompt, that indicates the variables are arriving but may not be referenced correctly in your prompt. In your prompt, make sure you're referencing the variables using the
{{variable_name}}
syntax, like: [(3) ]()
Copy code
The customer's name is {{customer_name}} and their status is {{status}}.
If the agent speaks the variable correctly in the begin message but not in the prompt responses, try explicitly instructing the agent to use those variables in a "Context" section of your prompt. [(2) ]()
​ To learn more, see the sources I considered: [[1] Dynamic Variables](https://discord.com/channels/1186424376300679209/1356680357084135558) [[2] Dynamic Variables](https://discord.com/channels/1186424376300679209/1340177140204699649) [[3] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.