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

MethodPathDescription
POST/tools/apiRegister an API tool
GET/tools/apiList 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

NameTypeRequiredDescription
namestring✓Tool name (e.g. "lookup_order")
descriptionstring✓What this tool does (shown to the LLM)
methodstring✓HTTP method: GET, POST, PUT, PATCH, DELETE
urlstring✓Full endpoint URL (supports {{variable}} placeholders)
headersobjectStatic headers to include in every request
authobjectAuthentication: bearer, api_key, or basic
parametersobject[]Parameter definitions for the LLM
response_mappingobjectMap response fields to agent-friendly names
timeout_msintegerRequest 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.