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.1
Configure function details
Add a name and description. The name must be unique and separated with underscores.
2
Select HTTP Method
Choose the HTTP method:
GET, POST, PATCH, PUT, or DELETE.3
Add endpoint URL
Add the URL where UponAI will send the request. Must be a valid URL.
4
Set request headers (optional)
Define custom headers to include with the request. Header values can be static or include dynamic variables.
5
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.
6
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:7
Set response variables (optional)
Extract values from the API response and save them as dynamic variables for use later in the conversation.For example, extract a user’s name and reference it later using
{{user_name}}.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