Skip to main content

Overview

The Vaani Backend API provides endpoints for building and configuring voice agents, triggering and managing calls, and connecting in-browser sessions via WebRTC. All endpoints require API key authentication via the X-API-Key header.

Authentication

All endpoints require API key authentication. Include your API key in the request header:
X-API-Key: vaani_<your_key>
Keep your API key secure and never expose it in client-side code or public repositories.

Base URL

All endpoints are prefixed with /api/. The base URL is:
https://api.vaanivoice.ai

API Version

Current API version: 2.0.0

Agent Builder

Use these endpoints to programmatically create and configure agents via the API.
MethodEndpointDescription
POST/api/create-agentCreate a new agent
PATCH/api/agent/{agent_id}/personaUpdate identity, AI providers
PATCH/api/agent/{agent_id}/trainingUpdate knowledge base, FAQ, guardrails
PATCH/api/agent/{agent_id}/experienceUpdate conversational feel and call settings
PATCH/api/agent/{agent_id}/analysisUpdate post-call evaluation and data extraction
PATCH/api/agent/{agent_id}/deploymentUpdate phone number routing
All PATCH endpoints perform a partial merge — only the fields you send are updated.

Call Management

MethodEndpointDescription
POST/api/trigger-call/Trigger an outbound call
POST/api/webrtc/tokenGenerate a LiveKit WebRTC token
GET/api/call-historyPaginated call history
GET/api/transcript/{call_id}Get call transcript
GET/api/call_details/{call_id}Get call details, summary, and extractions
GET/api/stream/{call_id}Stream audio recording