legend28469
11/19/2025, 3:47 AMAI Evy
11/19/2025, 3:47 AMAI Evy
11/19/2025, 3:47 AMjson
{
"name": "function_name",
"call": { /* call object with context and transcript */ },
"args": { /* function arguments as JSON object */ }
}
The request body contains :
- `name`: the name of the custom function
- `call`: the call object for context, including real-time transcript up to when the request is sent
- `args`: the arguments for the custom function as a JSON object
The request also includes headers :
- `X-Retell-Signature`: encrypted request body using your secret key to verify the request is from Retell
- Content-Type: application/json indicating the payload is in JSON format
For GET and DELETE requests, the request body is empty .AI Evy
11/19/2025, 3:48 AMlegend28469
11/19/2025, 3:48 AMAI Evy
11/19/2025, 3:48 AMjson
{
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"opt_out_sensitive_data_storage": true
},
"name": "get_weather",
"args": {
"city": "New York"
}
}
In this example, the custom function is named get_weather , and it receives a city argument with the value "New York" . The call object contains context about the phone call, including caller information, call ID, agent ID, and any dynamic variables .AI Evy
11/19/2025, 3:48 AMAI Evy
11/19/2025, 3:48 AMlegend28469
11/19/2025, 3:51 AMAI Evy
11/19/2025, 3:51 AMAI Evy
11/19/2025, 3:51 AMcall object will include a direction field that indicates whether it's an "inbound" or "outbound" call [(1) ]() . For outbound calls, the from_number will be your Retell number and the to_number will be the destination number you're calling [(3) ]() .AI Evy
11/19/2025, 3:51 AMAI Evy
11/19/2025, 3:51 AMAI Evy
11/19/2025, 3:53 AMAI Evy
11/19/2025, 3:53 AM