Custom functions allow you to extend your agent’s capabilities by integrating external APIs, providing additional knowledge, or implementing custom logic.Documentation Index
Fetch the complete documentation index at: https://documentation.uponai.com/llms.txt
Use this file to discover all available pages before exploring further.
Steps to Create a Custom Function
When a custom function is called, UponAI sends a request (POST, GET, PUT, PATCH, DELETE) to your specified URL with the function name and parameters. You can include headers and query parameters in the request, and extract data from the response.Configure function details
Add a name and description. The name must be unique and separated with underscores.
Set request headers (optional)
Define custom headers to include with the request. Header values can be static or include dynamic variables.
Set query parameters (optional)
Define query parameters to append to your endpoint URL. Toggle between a parameter description (resolved by LLM) or a const value (applied directly). Both support dynamic variables.
Define parameters
Define parameters using JSON schema format or JSON form. Only available for
POST, PATCH, and PUT requests.Payload: args only — When enabled, the JSON body contains only the function’s arguments at the top level, with no outer wrapper (name, call, args). Enable this when your endpoint expects a flat JSON body matching your parameter object exactly.Example parameter schema:If you fail to save the custom function, it’s likely because the parameters are not valid. A common mistake is not adding
"type": "object" to the top level of the JSON schema.Request & Response Spec
Request
Headers:X-Retell-Signature: encrypted request body using your secret key — used to verify the request is from UponAIContent-Type: application/json
name: the name of the custom functioncall: the call object with context including real-time transcript up to the time the request is sentargs: the arguments for the custom function as a JSON object
Response
Return a status code between200-299 to indicate success. Response can be in any format (string, buffer, JSON object, blob) — all are converted to string before being sent to the LLM.
The function result is capped at 15,000 characters to prevent overloading the LLM context window.
Verifying Requests from UponAI
Verify theX-Retell-Signature header to confirm requests are coming from UponAI. For GET and DELETE requests, the request body is empty — use an empty string in the verify function.
100.20.5.228