API Reference
Start Voice Session
POST /api/v1/voice-agents/:agentId/sessions — start a voice session and get a LiveKit token.
Creates a LiveKit room, dispatches the Elizon voice agent into it, and returns a participant token your client can use to connect and start talking.
POST /api/v1/voice-agents/{agentId}/sessionsPath parameters
| Parameter | Type | Description |
|---|---|---|
agentId | string (UUID) | The agent ID returned by GET /voice-agents. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
participantIdentity | string (1–256 chars) | Yes | Identifies the caller as a LiveKit participant — use a user ID, session ID, or similar from your own system. |
Response
200 OK
{
"sessionId": "a1c4...",
"wsUrl": "wss://lk.elizon.ai",
"token": "eyJhbGciOi...",
"agentId": "3f9c1a2e-...",
"voiceConfigId": "8b1e0c4a-..."
}Pass wsUrl and token to a LiveKit client SDK's connect() call — see SDK Integration. The token expires 60 minutes after issue (see Security).
Errors
| Status | error | When |
|---|---|---|
400 | validation error ({ "errors": [...] }) | participantIdentity fails validation |
403 | forbidden | agentId doesn't belong to your organization (or, for project-scoped keys, your project) |
404 | voice_configuration_not_found | The agent has no voice configuration (e.g. it was removed after you called GET /voice-agents) |
429 | concurrent_session_limit | The calling API key already has 5 active sessions |
429 | rate_limit_exceeded | More than 10 requests/minute for this key on this endpoint — see Rate Limits |
503 | voice_infrastructure_unavailable | The LiveKit server is unreachable |
Example
curl -X POST https://api.elizon.com/api/v1/voice-agents/3f9c1a2e-.../sessions \
-H "X-API-Key: elz_your_key_here" \
-H "Content-Type: application/json" \
-d '{"participantIdentity": "user-123"}'