https://retellai.com/?utm_source=discord&utm_medium=seo logo
a
HI @AI Evy ??
a
Thanks for tagging me @ashish_mangoit. I'll look through relevant sources and get back to you shortly.
### Answer Hi! I'm an AI assistant knowledgeable about Retell AI. I use documentation and other sources to help answer questions you might have about Retell AI's voice agents, chat functionality, API integration, and more. Let me know how I can be helpful with your Retell AI questions!
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
message has been deleted
a
Hi @AI Evy , I am getting error if I am trying to add entering the custom function url in the custom_function like invalid hostname
a
Thanks for the follow-up, @ashish_mangoit. I'll get back to you soon.
### Answer The "invalid hostname" error when adding a custom function URL typically occurs when the URL format isn't correct [(1) ]() [(2) ]() . For custom functions in Retell AI, the endpoint URL must be a valid URL . Here are the requirements: URL Format Requirements: - The URL must be a complete, valid URL - Include the protocol () - Ensure the hostname is properly formatted Common Issues to Check: 1. **Missing Protocol**: Make sure your URL starts with ` or ` 2. **Invalid Characters**: Ensure there are no spaces or invalid characters in the URL 3. **Hostname Format**: The hostname should follow standard domain name conventions Example of Correct URL Format:
Copy code
<https://your-domain.com/api/custom-function>
If you're still experiencing issues after verifying the URL format, double-check that: - The endpoint is accessible from external networks - The server is running and responding to requests - Any firewall or security settings allow incoming requests from Retell AI [(2) ]()
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
for testing, I am trying to add this url but still getting error: https://yourdomain.com/api/custom-function
@AI Evy I am trying this: https://yourdomain.com/api/custom-function but still getting error
a
Thanks for the follow-up, @ashish_mangoit. I'll get back to you soon.
### Answer The URL ` is causing an error because "yourdomain.com" is a placeholder domain, not a real, accessible endpoint [(1) ]() [(2) ]() . For custom functions to work, you need to provide a valid, accessible URL that points to your actual server endpoint . The URL must be a real domain that Retell AI can reach to execute your custom function . What you need to do: 1. Replace
yourdomain.com
with your actual domain name 2. Ensure your server is running and accessible from the internet 3. Make sure the endpoint can receive POST requests (or the HTTP method you've selected) Example of what a real URL should look like:
Copy code
<https://myapp.herokuapp.com/api/book-appointment>
<https://api.mycompany.com/custom-function>
<https://12.34.56.78:3000/webhook>
The endpoint must be able to receive requests from Retell AI and respond with the appropriate data . If you're testing locally, you'll need to use a service like ngrok to make your local server accessible from the internet, or deploy your function to a cloud service.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ 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] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
a
@AI Evy , I have giving like https://elgonia.mangoitsol.com/test.php and it's working but still giving problem
a
Thanks for the follow-up, @ashish_mangoit. I'll get back to you soon.
### Answer ### Answer If your URL ` is working but you're still getting errors when adding it as a custom function, here are some common troubleshooting steps based on the documentation: Check URL Format Issues: 1. **Trailing Slash**: Remove any trailing slash from your URL [(1) ]() . Some server setups might not allow a trailing slash in the URL [(2) ]() . - Correct: ` - Potentially problematic: ` 2. **HTTP Method**: Ensure your endpoint supports the HTTP method you've selected in the custom function configuration [(3) ]() [(4) ]() . Available methods include GET, POST, PATCH, PUT, and DELETE . Verify Endpoint Requirements: Your endpoint must: - Be publicly accessible [(5) ]() - Return a status code between 200-299 to indicate success [(3) ]() [(4) ]() - Handle the selected HTTP method properly [(5) ]() Test Your Endpoint: You can test your endpoint using tools like curl or Postman to ensure it returns a 2xx status code :
Copy code
bash
curl -I <https://elgonia.mangoitsol.com/test.php>
Common Issues: - If you're getting "Invalid hostname provided" errors, double-check that your endpoint URL is public and includes the correct protocol () - Confirm the endpoint handles the HTTP method you've selected (POST, GET, etc.) If the basic connectivity test works but Retell AI still can't save the function, the issue might be with how your endpoint responds to Retell's specific request format or validation checks.
​ To learn more, see the sources I considered: [[1] Custom Tool Function Call sends a "GET" from Retell to my URL and not a "POST" . Empty request body.](https://discord.com/channels/1186424376300679209/1284824056801132678) [[2] Troubleshooting Guide](https://docs.retellai.com/integrate-llm/troubleshooting) [[3] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) [[4] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[5] Issue with Custom Function Addition for my Account](https://discord.com/channels/1186424376300679209/1392402892119478384) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
curl -I https://elgonia.mangoitsol.com/test.php HTTP/1.1 200 OK Date: Wed, 20 Aug 2025 09:06:25 GMT Content-Type: text/html; charset=UTF-8 Connection: keep-alive Server: cloudflare Cf-Cache-Status: DYNAMIC Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=a9qJTidQ5rHhQlSpXPM6eBI0f3rs04xaWpEKVxjeSStev71PDu2hjlFaT4OCh%2BTAzHY3iUwzZKrWvIbwz8h%2BmWadEv7B3g0piOCMoPm5ikSe0QdA3FM%3D"}]} Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} CF-RAY: 9720bc0fcc7f47e0-BOM alt-svc: h3=":443"; ma=86400
@AI Evy I am getting this
a
Thanks for the follow-up, @ashish_mangoit. I'll get back to you soon.
### Answer ### Answer Great! Your endpoint is returning a 200 OK status, which means it's accessible and responding correctly [(1) ]() [(2) ]() . Since the basic connectivity is working but you're still getting an "invalid hostname" error when adding the custom function, here are a few additional troubleshooting steps: Parameter Schema Issues: The most common reason custom functions fail to save is invalid parameter schema . Make sure you include
"type": "object",
at the top level of your JSON schema :
Copy code
json
{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "The city of the weather"
    }
  },
  "required": [
    "city"
  ]
}
[(1) ]() , [(2) ]() Request Format Requirements: Your endpoint needs to handle the specific request format that Retell sends [(1) ]() [(2) ]() : - **Header**:
X-Retell-Signature
(encrypted request body using your secret key) - **Content-Type**:
application/json
- Body (for POST, PUT, PATCH) : Contains
name
,
call
, and
args
fields Security Considerations: You can also secure your server by allowlisting Retell's IP address:
100.20.5.228
. Since your URL is responding with a 200 status, the issue is likely with the parameter schema format or how your endpoint handles Retell's specific request structure. Double-check that you've added the
"type": "object",
field to your parameter schema if you're using one.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy , I didn't add any parameter schema or any headers
a
Thanks for the follow-up, @ashish_mangoit. I'll get back to you soon.
### Answer Since your endpoint is returning a 200 OK status and you haven't added any parameter schema or headers, the "invalid hostname" error might be related to the basic configuration setup [(1) ]() . For custom functions in Retell AI, here are the minimum requirements : Basic Configuration Steps: 1. **Function Name**: Must be unique and separated with underscore (e.g.,
get_user_details
) 2. **Description**: Add a clear description of what the function does 3. **HTTP Method**: Select the appropriate method (GET, POST, PATCH, PUT, DELETE) 4. **Endpoint URL**: Must be a valid URL (which yours appears to be) For GET Requests: Since you mentioned no parameters or headers, if you're using a GET request, you can leave the parameter schema empty . However, for POST, PATCH, and PUT requests, parameters are only available and might be required . Potential Issues to Check: - Make sure you've selected the correct HTTP method that your endpoint supports - Verify that the function name contains only valid characters and uses underscores - Ensure your endpoint can handle requests from external sources [(2) ]() Testing Your Endpoint: Your endpoint should be able to process requests from Retell AI and return JSON responses [(1) ]() . Since your curl test shows a 200 response, the basic connectivity is working. If you're still getting the "invalid hostname" error after verifying these basic settings, try creating a simple test function with minimal configuration to isolate the issue.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Voice API: Integrate Phone AI Agents with Your System | Retell AI](https://www.retellai.com/blog/how-to-integrate-phone-ai-agents-with-your-existing-api-systems) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
as you know that @AI Evy , I have done everything properly as my url is working and giving me 200 ok but still getting error like invalid hostname
a
Thanks for the follow-up, @ashish_mangoit. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) [[2] Integrate any system with custom function](https://docs.retellai.com/build/single-multi-prompt/custom-function) ​
it [Contact Sales]() or [) for additional support. Would you like me to provide a general answer about common URL validation issues in web applications?
### Answer Since your URL is working and returning a 200 OK response, but you're still getting an "invalid hostname" error when saving the custom function, this suggests the issue might be with how Retell AI validates the URL during the configuration process rather than the actual endpoint accessibility [(1) ]() [(2) ]() . Additional Troubleshooting Steps: 1. **Clear Browser Cache**: Sometimes cached validation errors can persist. Try clearing your browser cache or using an incognito/private window [(1) ]() . 2. **URL Encoding**: Ensure there are no hidden characters or encoding issues in your URL. Try typing the URL fresh rather than copying/pasting [(1) ]() [(2) ]() . 3. **Dashboard Refresh**: Try refreshing the Retell AI dashboard and attempting to add the custom function again [(1) ]() . 4. **Temporary Alternative**: As a test, try using a different endpoint URL format or a simple webhook testing service like webhook.site to see if the issue persists [(1) ]() [(2) ]() . Verification Steps: Since your endpoint returns a proper 200 response, the issue is likely on Retell AI's validation side. The documentation indicates that custom functions require a valid URL , which yours appears to be. If the issue persists after trying these steps, this might be a platform-specific validation issue that requires direct support assistance. Vis
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.