Custom functions let your voice agents call external HTTP endpoints mid-conversation. When the agent determines it needs to perform an action — check the weather, book an appointment, look up an order — it invokes a function you’ve defined, waits for the response, and continues the conversation with that data.
curl -X POST https://api.vocobase.com/api/functions \ -H "Authorization: Bearer rg_live_abc123def456ghi789jkl012" \ -H "Content-Type: application/json" \ -d '{ "name": "get_weather", "description": "Retrieve current weather for a city. Call this when the user asks about weather conditions.", "url": "https://api.weather.com/v1/current", "headers": [ { "key": "Authorization", "value": "Bearer weather_api_key_here" } ], "inputSchema": [ { "name": "city", "type": "string", "description": "City name", "required": true } ], "outputSchema": [ { "name": "temperature", "type": "number", "description": "Temperature in Celsius", "required": true }, { "name": "condition", "type": "string", "description": "Weather condition (e.g., Sunny, Rainy)", "required": true } ], "timeout": 10, "startedMessages": ["Checking the weather...", "Let me look that up..."], "errorMessage": "Sorry, I couldn't get the weather right now." }'
{ "id": "f1234567-abcd-1234-abcd-123456789012", "name": "get_weather", "description": "Retrieve current weather for a city...", "method": "POST", "url": "https://api.weather.com/v1/current", "hasHeaders": true, "inputSchema": [...], "outputSchema": [...], "timeout": 10, "startedMessages": ["Checking the weather...", "Let me look that up..."], "errorMessage": "Sorry, I couldn't get the weather right now.", "agentId": null, "createdAt": "2026-04-16T10:30:00Z"}
{ "name": "city", "type": "string", "description": "City name to look up", "required": true}
Field
Type
Description
name
string
Field name
type
string
string, number, boolean, string[], number[], or custom
description
string
Helps the LLM understand what to pass or expect
required
boolean
Whether the field is mandatory
jsonSchema
object
Required when type is custom. A JSON Schema object for complex types.
The description field on the function is the most important part. The LLM uses it to decide when to call the function. A vague description means the agent won’t know when to use it. Be explicit: “Call this when the user asks about order status” is better than “Get order info”.
These names are used by built-in integrations and cannot be used:knowledge_base_search, calendar_create_event, calendar_list_events, calendar_update_event, calendar_delete_event, gmail_send_email, gmail_search_emails, slack_send_message, slack_list_channels, add_to_cart, view_cart, clear_cart, checkout
Write clear descriptions. The description is the #1 factor in whether the agent calls the function at the right time. Include specific trigger phrases: “Call this when the user asks about their order status or delivery date.”
Keep timeouts short. Users are waiting in real-time. A 10-second timeout feels like an eternity in a voice conversation.
Use startedMessages. They fill the silence while your endpoint processes. Without them, there’s dead air.
Test with the voice sandbox. Create the function, assign it to an agent, then test it in the dashboard’s voice sandbox to verify the agent invokes it correctly.