Repository API Documentation
This API powers outbound voice calls through LiveKit. Use it to create SIP calls, control agent behavior, and capture call telemetry. The examples here reflect the current implementation in this repository.
Base URL: https://your-domain.example
Content-Type: application/json
Auth: API key required
Authentication
Send your account API key on every request using
X-API-Key or Authorization: Bearer. The
API derives account_code from the key and applies it to
the call metadata.
curl -X POST https://your-domain.example/api/calls \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"systemPrompt":"..."}'
Quickstart flow
- POST /api/calls with the call configuration.
- Use the returned
callIdfor follow-up actions. - Optionally hang up via
/api/calls/{callId}/hangup.
Queueing is automatic when capacity is exceeded. The response will
indicate queued: true when the call is delayed.
Endpoints
Create a call
Start a SIP or WebRTC call with LiveKit.
POST /api/calls
Create a token
Generate a LiveKit access token for web clients.
POST /api/token
Hang up a call
Release a call by ID.
POST /api/calls/{callId}/hangup
Check capacity
Active/queued call counts.
GET /api/calls/status