LionVoice API v1
Base URL: https://api.lionvoice.app/api/v1
The same engine that answers live EU lines. Speech, Lion-AI, tools and telephony — one product. No third-party platform names in your UI; the brain is Lion-AI.
JSON in, JSON out. PHP 7.4 compatible clients work. Rate limits are per API key.
Authentication
Create a key in the dashboard (API keys) or via POST /keys. The secret is shown once. Send it as Bearer:
curl -sS https://api.lionvoice.app/api/v1/tenant \
-H "Authorization: Bearer lv_live_…"
# or
-H "X-LV-Api-Key: lv_live_…"
Ping does not need a key. Everything else does. A revoked key returns 401.
GET /ping
Health. No auth.
curl -sS https://api.lionvoice.app/api/v1/ping
# {"ok":true,"service":"LionVoice API","version":"v1","time":"…"}
GET /tenant
Who you are: plan, included minutes, wallet, SIP host (never the password), feature flags.
| Field | Meaning |
feat_callback_memory | Remind why I already called this number |
feat_named_greeting | Greet first + last name from billing |
feat_cli_identity | Authorise by caller number |
feat_birthday_calls | Birthday / care campaigns |
feat_crm_bridge | Paid CRM / accounting attach (+€79/mo) |
Assistants
GET /agents — list
POST /agents — create
GET /agents/{id}
PATCH /agents/{id}
DELETE /agents/{id}
Body (create / patch): name, prompt, first_message, voice (Lion-AI Warm, Lion-AI Clear, Lion-AI Low, Lion-AI Deep), language (en|lt|lv|de|es|it|fr|pl|ru), max_duration_sec, first_speaker (assistant|customer), webhook_url, filler_phrases, recording / transcript flags.
The AI brain is always Lion-AI. Do not send a customer-facing model picker.
curl -sS https://api.lionvoice.app/api/v1/agents \
-H "Authorization: Bearer lv_live_…" \
-H "Content-Type: application/json" \
-d '{"name":"Reception","language":"en","voice":"Sari","prompt":"You are… Address the customer as you."}'
Knowledge base
GET /files · POST /files {filename, content, agent_id?} · GET/PATCH/DELETE /files/{id}
Max 500 KB per file. Assign files to an assistant so Lion-AI can retrieve them on the call.
Tools
GET /tools — function tools the assistant may call (calendar, CRM, payments). Create and edit them in the dashboard; the engine posts to your url with the secret header you set.
CRM / accounting bridge (add-on €79/mo): I attach LionVoice to your system over SSH, then expose those tools here.
Phone numbers
GET /phone-numbers
POST /phone-numbers {number_e164, label?, provider?} — E.164 required, e.g. +37052636333
PATCH /phone-numbers/{id} {agent_id, label, inbound_enabled}
DELETE /phone-numbers/{id}
Inbound routing: DID → assistant. Add the same E.164 you register on SIP.
Bring your SIP number
Not a public REST write (password stays in the vault). In the dashboard SIP / VoIP you enter host, port, username, password, transport. LionVoice registers like a softphone. A cron every 2 minutes checks that the registration is alive and re-attaches if you saved new credentials.
Then map the DID under Phone numbers. Inbound lands in Lion-AI with jitterbuffer and PLC already on the trunk.
Calls
GET /calls?limit=&agent_id= — history
GET /calls/{uuid} — detail + transcript
POST /calls — originate outbound {to, agent_id, schedule_at?}
curl -sS https://api.lionvoice.app/api/v1/calls \
-H "Authorization: Bearer lv_live_…" \
-H "Content-Type: application/json" \
-d '{"to":"+447554522255","agent_id":1}'
If schedule_at is a UTC datetime, the call waits in /schedules. Immediate otherwise.
Schedules
GET /schedules · DELETE /schedules/{id}
POST /calls/{uuid}/transfer
Warm/blind transfer of a live call. Body: {to} E.164 or SIP URI.
GET /analytics?days=14
Minutes, call counts, by assistant. GET /usage?year=&month= — included vs overage vs wallet.
API keys
GET /keys · POST /keys {label} · DELETE /keys?id=
The full secret is returned only on create.
Billing
GET /plans — public catalogue (Demo / Start / Studio / Scale / EU Pro / BYOK) plus the CRM bridge add-on (€79/mo).
POST /topup {amount_eur} — Stripe Checkout URL (wallet €10–1000).
POST /checkout — subscribe to a plan slug.
POST /retention — transcript retention days.
Errors
JSON: {"ok":false,"error":"code","message":"…"}. HTTP 400 validation, 401 auth, 403 plan/cap, 404 missing, 409 conflict, 429 rate, 500 engine.
Never log SIP passwords or API secrets. Never show Lion-AI internals (engine ids are optional in API; customer UI should say Lion-AI only).