Skip to main content

Overview

Custom functions let your agent call any external API via HTTP request — enabling integrations with your CRM, database, booking system, or any other service.

Setup

1

Add the function

In your agent’s Functions section, click Add Function and select Custom Function.
2

Name the function

Use underscores to separate words. Example: check_order_status, create_lead.
Custom Function form showing Name and Description fields
3

Select HTTP method and set the endpoint URL

Choose from: GET, POST, PATCH, PUT, or DELETE. Enter the full URL of your API endpoint.
Custom Function API endpoint configuration showing POST method, URL, timeout, and headers
4

Configure headers and query parameters

Add any required authentication headers, API keys, or query params.
5

Define parameters

For POST, PATCH, and PUT requests, define your request body using JSON schema format.Enable Payload: args only to send only the function arguments as the JSON body, without an outer wrapper.
6

Handle the response

Map API response values to dynamic variables for use later in the conversation. Response data is capped at 15,000 characters.Configure speech behavior during and after execution:
  • Speak During Execution: Agent says something while waiting (e.g. “Let me check that for you.”)
  • Speak After Execution: Agent discusses the result with the caller
Response Variables mapping and Speak During/After Execution settings

Security

Every request includes an X-Retell-Signature header signed with your secret key. Verify this on your server to confirm requests are coming from UponAI.
const { Retell } = require('retell-sdk');
const client = new Retell({ apiKey: 'YOUR_API_KEY' });

app.post('/your-endpoint', (req, res) => {
  const valid = client.verify(
    JSON.stringify(req.body),
    req.headers['x-retell-signature']
  );
  if (!valid) return res.status(401).send('Unauthorized');
  // handle request
});

Constraints

SettingValue
Timeout2 minutes (default)
RetriesUp to 2 attempts
Response cap15,000 characters
Function name formatUnderscore-separated