REST API
The REST API lives at https://api.voice.kheelona.com. All paths start with /v1. Requests and responses are JSON.
Authentication
Section titled “Authentication”Authorization: Bearer kv_live_…: a partner API key, created in your Kheelona console. Server-to-server only; never ship it to a browser or a device. Revocation takes effect within 60 s.
Every response carries an X-Request-Id header. Errors use one shape (see Errors).
Scopes
Section titled “Scopes”An API key carries the scopes it was created with; an operation needs the scope shown.
| Scope | Operations |
|---|---|
sessions:read |
listSessions, getSession |
sessions:write |
createSession, endSession |
usage:read |
getUsage |
voices:read |
listVoices, getVoice |
Operations
Section titled “Operations”sessions
Section titled “sessions”Create sessions, read the connection log, end sessions
| Operation | Endpoint | Summary |
|---|---|---|
listSessions |
GET /v1/sessions |
The partner’s connection log, newest first. |
createSession |
POST /v1/sessions |
Creates a session. |
getSession |
GET /v1/sessions/{id} |
One of the partner’s sessions. |
endSession |
POST /v1/sessions/{id}/end |
Ends a live session (reason partner_ended; the live connection closes within 10 s) or cancels a reserved one. Ending a finished session is a no-op. |
voices
Section titled “voices”The voices enabled for your partner
| Operation | Endpoint | Summary |
|---|---|---|
listVoices |
GET /v1/voices |
The voices enabled for this partner. |
getVoice |
GET /v1/voices/{id} |
One voice. |
languages
Section titled “languages”The supported languages
| Operation | Endpoint | Summary |
|---|---|---|
listLanguages |
GET /v1/languages |
The supported languages. |
Usage for invoicing and cost analysis
| Operation | Endpoint | Summary |
|---|---|---|
getUsage |
GET /v1/usage |
Usage for the key’s partner. |
health
Section titled “health”Service health
| Operation | Endpoint | Summary |
|---|---|---|
getHealth |
GET /v1/health |
The service’s health. |