Skip to main content

Generate Access Token

Generate a LiveKit access token for a web-based voice session. GET /calls/generate-token Authentication: JWT cookie or API key Query Parameters:
ParameterTypeRequiredDescription
phonestringAgent phone number to connect to
idstringUnique session identifier
curl -X GET "https://api.vaani.ai/calls/generate-token?phone=%2B16505551234&id=session_001" \
  -H "Cookie: access_token=YOUR_TOKEN"

Make Outbound Call

Create a new outbound call from an agent to a target phone number. POST /calls/outbound_call Authentication: JWT cookie or API key
curl -X POST "https://api.vaani.ai/calls/outbound_call" \
  -H "Content-Type: application/json" \
  -H "Cookie: access_token=YOUR_TOKEN" \
  -d '{
    "agent_phone_number": "+16505551234",
    "phone_number_to_dial": "+14155559876",
    "dynamic_variables": {
      "customer_name": "John Smith",
      "account_id": "ACC-12345"
    }
  }'

Get Call Logs

Retrieve paginated call logs with optional filters. GET /calls/logs Authentication: JWT cookie or API key Query Parameters:
ParameterTypeDefaultDescription
pageinteger1Page number
page_sizeinteger25Items per page
call_typestringFilter: “phone” or “web”
agent_idstringFilter by specific agent
start_datestringISO 8601 date filter (start)
end_datestringISO 8601 date filter (end)
curl -X GET "https://api.vaani.ai/calls/logs?page=1&page_size=10&call_type=phone" \
  -H "Cookie: access_token=YOUR_TOKEN"

Get Single Call Log

GET /calls/{call_log_id} Returns the full call log with all fields (same schema as list item above).
curl -X GET "https://api.vaani.ai/calls/550e8400-e29b-41d4-a716-446655440000" \
  -H "Cookie: access_token=YOUR_TOKEN"

Export Call Logs (CSV)

Download call logs as a CSV file. GET /calls/export-csv Authentication: JWT cookie or API key Query Parameters: Same filters as GET /calls/logs
curl -X GET "https://api.vaani.ai/calls/export-csv?start_date=2026-02-01&end_date=2026-02-11" \
  -H "Cookie: access_token=YOUR_TOKEN" \
  -o call_logs.csv

Error Responses

StatusDetailCause
400"Invalid phone number format"Phone number missing or invalid
401"Invalid or missing token"Authentication failed
404"Call log not found"Call log doesn’t exist in workspace
404"Agent not found"Agent phone number not registered