API

Calls API

Start outbound calls and retrieve normalized call records.

Endpoints

MethodPathScope
GET/agentsread
POST/calls/outboundcalls:trigger
GET/callsread
GET/calls/{callId}read
GET/calls/{callId}/recordingread
GET/calls/export.csvread
GET/calls/streamread

List-call filters

QueryDescription
pagePage number beginning at 1.
limitRows per page from 1 to 100; default 20.
agentIdReturn calls for one agent.
statusReturn calls with the selected status.
directionFilter inbound, outbound, or web calls.
fromEarliest start timestamp in ISO 8601 format.
toLatest start timestamp in ISO 8601 format.

Create outbound call

curl
curl -X POST "https://api.vozon.ai/api/v1/calls/outbound" \
  -H "Authorization: Bearer avp_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "agent_id",
    "phoneNumber": "+919876543210",
    "metadata": { "customerId": "customer_123" }
  }'
FieldTypeRequiredDescription
agentIdstringYesA Live agent belonging to the active organization.
phoneNumberstringYesDestination in E.164 format.
phoneNumberIdstringNoSpecific assigned outbound number; otherwise the latest eligible number is used.
metadataobjectNoFictional or business-safe correlation data returned with the call.

JavaScript

javascript
const response = await fetch("https://api.vozon.ai/api/v1/calls/outbound", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.VOZON_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    agentId: "agent_id",
    phoneNumber: "+919876543210",
    metadata: { customerId: "customer_123" },
  }),
});

if (!response.ok) throw new Error(`Vozon request failed: ${response.status}`);
const call = await response.json();

Python

python
import os
import requests

response = requests.post(
    "https://api.vozon.ai/api/v1/calls/outbound",
    headers={"Authorization": f"Bearer {os.environ['VOZON_API_KEY']}"},
    json={
        "agentId": "agent_id",
        "phoneNumber": "+919876543210",
        "metadata": {"customerId": "customer_123"},
    },
    timeout=30,
)
response.raise_for_status()
call = response.json()