API Tools & Function Calling Documentation
Extend AI voice agents with API tools, function calling, external services, workflow automation, and integrations.
How API Tools Work
API tools wrap any REST endpoint into a callable tool for your agent. When the agent decides to use an API tool, Voxentis makes the HTTP request, processes the response, and feeds the result back into the conversation.
- Tool signatures follow the pattern:
{HTTP_METHOD}_{endpoint_name} - Supports GET, POST, PUT, PATCH, DELETE methods
- Request parameters are extracted from the conversation context
- Responses are parsed and summarized for the agent automatically
- Built-in retry and timeout handling
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /tools/api | Register an API tool |
| GET | /tools/api | List API tools |
| GET | /tools/api/{id} | Get API tool details |
| PATCH | /tools/api/{id} | Update an API tool |
| DELETE | /tools/api/{id} | Remove an API tool |
Register API Tool
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | ✓ | Tool name (e.g. "lookup_order") |
| description | string | ✓ | What this tool does (shown to the LLM) |
| method | string | ✓ | HTTP method: GET, POST, PUT, PATCH, DELETE |
| url | string | ✓ | Full endpoint URL (supports {{variable}} placeholders) |
| headers | object | Static headers to include in every request | |
| auth | object | Authentication: bearer, api_key, or basic | |
| parameters | object[] | Parameter definitions for the LLM | |
| response_mapping | object | Map response fields to agent-friendly names | |
| timeout_ms | integer | Request timeout (default: 5000) |
curl -X POST https://api.voxentis.com/v1/tools/api \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "lookup_customer",
"description": "Look up a customer record by email or phone number",
"method": "GET",
"url": "https://crm.example.com/api/customers",
"auth": {
"type": "bearer",
"token_env": "CRM_API_TOKEN"
},
"parameters": [
{ "name": "email", "type": "string", "description": "Customer email address", "in": "query" },
{ "name": "phone", "type": "string", "description": "Customer phone number", "in": "query" }
],
"response_mapping": {
"name": "$.data.full_name",
"account_status": "$.data.status",
"last_order": "$.data.orders[0].id"
}
}'
Security: API credentials are stored encrypted and never exposed in logs or agent responses. Use token_env to reference secrets stored in your environment configuration.