minus.ace
08/21/2025, 8:46 PMAI Evy
08/21/2025, 8:46 PMAI Evy
08/21/2025, 8:47 PMjson
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}
[(1) ]()
3. Request Structure
When the function is called, Retell sends a POST request to your endpoint with this structure [(1) ]() [(2) ]() :
- **Headers**: Include X-Retell-Signature for verification and Content-Type: application/json
- Body (JSON format) : Contains name (function name) , call (call context) , and args (the function arguments)
**Important Note**: Retell doesn't send raw POST body data - it sends structured JSON that includes the function name, call context, and your defined arguments [(3) ]() . Your backend needs to extract the relevant data from this structure and make separate API calls if needed .AI Evy
08/21/2025, 8:47 PMAI Evy
08/21/2025, 8:47 PMminus.ace
08/21/2025, 8:48 PMAI Evy
08/21/2025, 8:48 PMAI Evy
08/21/2025, 8:48 PMargs field containing your parameters . For example, if the agent calls the function with "paris" as the city parameter, your endpoint would receive something like:
json
{
"name": "get_weather",
"call": { /* call context */ },
"args": {
"city": "paris"
}
}
You can then extract the city value from content.args.city in your backend code, as shown in the verification examples :
javascript
const content = req.body;
if (content.args.city === "New York") {
return res.json("25f and sunny") ;
} else {
return res.json("20f and cloudy") ;
}
[(1) ]()
The parameters you define in the JSON schema become the structure for the args object that gets sent to your endpoint [(1) ]() [(2) ]() .AI Evy
08/21/2025, 8:48 PMAI Evy
08/21/2025, 8:48 PMminus.ace
08/21/2025, 9:01 PMAI Evy
08/21/2025, 9:01 PMAI Evy
08/21/2025, 9:01 PMContent-Type: application/json format [(1) ]() . The documentation shows that when a custom function is called, Retell sends a structured JSON payload to your endpoint containing the function name, call context, and parameters .
The documentation doesn't specify support for application/x-www-form-urlencoded content type. Custom functions are designed to work with JSON-formatted request bodies, where you define parameters using JSON schema format .
If you need to send form-encoded data to a third-party API, you would typically:
1. Receive the JSON payload from Retell at your custom function endpoint
2. Extract the needed data from the JSON structure
3. Transform and forward that data to your target API using the required content type from your backend
I don't have specific information about configuring alternative content types for custom function requests in the available sources.AI Evy
08/21/2025, 9:01 PMAI Evy
08/21/2025, 9:01 PM