frnk2099
08/15/2025, 12:23 AMAxios Error: error code: ERR_BAD_REQUEST, error message: Request failed with status code 400 response status: 400 response data: [{"error":"1"},"Invalid parameters"]
Why?AI Evy
08/15/2025, 12:23 AMAI Evy
08/15/2025, 12:24 AMjson
{
"type": "object",
"properties": {
"city": {
"type": "string",
"description": "The city of the weather"
}
},
"required": [
"city"
]
}AI Evy
08/15/2025, 12:24 AMargs object [(4) ]() . If your API expects the data directly, you may need to use an option that sends only the items you defined in the tool config [(5) ]() .
## Troubleshooting Steps
1. **Verify parameter schema**: Ensure you're using proper JSON schema format, not actual JSON data [(2) ]() [(1) ]()
2. **Check request structure**: Your endpoint should expect the parameters nested under an args object [(3) ]()
3. **Validate endpoint**: Test your endpoint independently to ensure it works with the expected request format [(2) ]()
If your external API expects a different format than what Retell sends, you may need to create an intermediate API that reformats the request before calling your target endpoint [(1) ]() .AI Evy
08/15/2025, 12:24 AMAI Evy
08/15/2025, 12:24 AMfrnk2099
08/15/2025, 1:38 AMAI Evy
08/15/2025, 1:38 AMAI Evy
08/15/2025, 1:38 AMContent-Type: application/json
However, since it's a GET request, the function arguments will be passed as query parameters rather than in the request body.
## Troubleshooting Steps
1. **Remove parameter definitions**: If you have parameters defined in your custom function configuration, remove them since they're not supported for GET requests
2. **Use query parameters instead**: Set up query parameters in your function configuration to pass the needed data
3. **Verify endpoint**: Ensure your endpoint expects the data as query parameters, not in the request body
The 400 error suggests your endpoint is receiving data in a format it doesn't expect. Since you're using GET, make sure your API expects query parameters rather than a JSON body.AI Evy
08/15/2025, 1:38 AMAI Evy
08/15/2025, 1:38 AMfrnk2099
08/15/2025, 1:41 AMAI Evy
08/15/2025, 1:41 AMAI Evy
08/15/2025, 1:41 AMget_package_info)
2. **HTTP Method**: Set to GET
3. **Endpoint URL**: Your public API endpoint
4. **Headers**: Any required headers for your API
5. **Query parameters**: If your API needs any query parameters
## Common Issues with GET Requests
Since you're getting a 400 error and your endpoint isn't receiving anything, the issue might be:
1. **URL Format**: Ensure your endpoint URL is valid and accessible
2. **Headers**: Retell sends specific headers with requests, which might cause issues if your API doesn't expect them
## Troubleshooting Steps
Follow these verification steps [(2) ]() :
1. **Check endpoint accessibility**: Test your public API directly with a simple GET request outside of Retell
2. **Verify URL format**: Ensure there are no trailing slashes or formatting issues that might cause problems
3. **Review server logs**: Check if your endpoint is receiving any requests at all from Retell
## Request Structure for GET
When Retell calls your GET endpoint, it will still send headers including authentication and content-type headers [(1) ]() . Some APIs might reject requests with unexpected headers.
If your public API is very simple and doesn't expect any special headers, you might need to create a wrapper endpoint that can handle Retell's request format and then call your target API.
Without seeing your exact configuration, I'd recommend first testing your puAI Evy
08/15/2025, 1:41 AMAI Evy
08/15/2025, 1:41 AMAI Evy
08/15/2025, 1:41 AM