https://retellai.com/?utm_source=discord&utm_medium=seo logo
For the update-call api endpoint, what should I do...
# ❓・ai-evy-support
m
@AI Evy For the update-call api endpoint, what should I do if I want to send a new dynamic variable to the call ?
a
Thanks for tagging me @micheldenizob. I'll look through relevant sources and get back to you shortly.
### Answer The update-call API endpoint supports the
override_dynamic_variables
parameter to send new dynamic variables to an ongoing call [(1) ]() . You can use the
override_dynamic_variables
object in the request body, which allows you to override or add dynamic variables set in the agent during the call . You only need to set the delta where you want to override, not the entire dynamic variables object . Here's the format:
Copy code
json
{
  "override_dynamic_variables": {
    "additional_discount": "15%"
  }
}
However, there's an important limitation mentioned in the Discord discussions: the metadata and dynamic variables during a call have different states, and at the start of the call the new state is being used and is not replicated [(2) ]() . For inbound calls specifically, dynamic variables are typically set through the inbound webhook URL rather than through the update-call endpoint .
​ To learn more, see the sources I considered: [[1] Update Call](https://docs.retellai.com/api-references/update-call) [[2] Using Patch (Call Update), not passing metadata back to call](https://discord.com/channels/1186424376300679209/1405378389443088444) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.