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: X-API-Key (optional)
Authentication
If DISPATCH_API_KEY is configured, send it as an
X-API-Key header or Authorization: Bearer
token. Otherwise, the API is open in trusted environments.
curl -X POST https://your-domain.example/api/calls \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_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