What are custom functions?
Custom functions let your Voice AI agent call your own APIs during live conversations. Check order status, update a CRM, book appointments, or integrate with any system - all while on a call.
Custom function JSON editor showing a function schema with name, description, pre_call_message, parameters, and API configuration
How custom functions work
LLM Reads Function Definition
name and description to understand what the function doesDecides When to Call
Extracts Parameters
Bolna Executes API Call
Response Feeds Back
Creating a custom function
You can create a custom function in two ways from the Tools Tab:
Add a Custom Tool section showing the Write manually and Generate from cURL options
- Write Manually
- Generate from cURL

Custom function JSON editor with a sample schema showing name, description, pre_call_message, parameters, key, and API configuration
name, description, key, and method are mandatory. The key must always be set to "custom_task".Go deeper
Schema reference
%(name)s format specifiers.Examples
Variables & context
Pre-call webhooks
Source IP whitelist
Bolna calls your endpoint from a fixed set of source IPs. If your API sits behind a firewall or an IP allowlist, permit all three or the tool call will fail and the agent will have nothing to say back to the caller:Best practices
Write detailed descriptions
Always add pre-call message
Use required fields wisely
Test APIs first
Leverage auto-injection
Match names exactly
properties and param must be identical (case-sensitive)Troubleshooting
Function not being triggered
Function not being triggered
API returns error
API returns error
api_token format and required headers.Parameters not being passed correctly
Parameters not being passed correctly
properties and param. Use %(name)s format.Variables not being substituted
Variables not being substituted
{variable_name} syntax.


