https://retellai.com/?utm_source=discord&utm_medium=seo logo
how do I pass static variables into an function/ap...
# ❓・ai-evy-support
o
@AI Evy how do I pass static variables into an function/api call?
a
Thanks for tagging me @objectsclattering. I'll look through relevant sources and get back to you shortly.
### Answer In Retell AI, you can pass static variables into function/API calls through several methods: ## Custom Functions with Static Headers and Query Parameters When creating custom functions, you can set static values in request headers and query parameters [(1) ]() . You can define custom headers to include with the request Retell sends to your endpoint, and header values can be static or include dynamic variables . Similarly, you can define query parameters to include in the request URL that Retell appends to your endpoint, where query parameter values can be static or include dynamic variables . ## SMS Tool with Static Content For SMS functionality, you can use static SMS content where dynamic variables are supported for static SMS content [(2) ]() . You can write a prompt to let the agent infer the SMS content, or use static SMS content . ## Dynamic Variables with Static Values You can also use dynamic variables that have static values assigned to them [(3) ]() . When a dynamic variable has an assigned value, it gets replaced in the content . For example, if you set a variable like
user_name
to "John", then
"Hello {{user_name}}"
becomes
"Hello John"
. The exact implementation depends on whether you're using custom functions, built-in tools like SMS, or dynamic variable substitution in your prompts and configurations.
​ To learn more, see the sources I considered: [[1] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[2] Send SMS](https://docs.retellai.com/build/single-multi-prompt/send-sms) [[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.
o
That static values need to go in the body for the http POST.