SYVIX REST API
Base URL for the local reference server: http://localhost:7802. JSON in, JSON out. Errors use { error: { code, message } } with standard HTTP status codes.
Authentication
Session tokens are issued by POST /v1/auth/login and sent as a Bearer token. Tokens are HMAC-signed, expire (default 12 h) and are scoped to one organisation. Production adds API keys and SSO.
/v1/auth/loginpublicIn developmentExchange email + password for a session token
{ "email": "owner@demo.syvix.test", "password": "••••••••" }{ "token": "eyJ…", "expiresAt": "2026-11-19T21:40:00Z",
"user": { "id": "usr_…", "role": "owner", "orgId": "org_demo" } }/v1/meanyIn developmentCurrent user and organisation
{ "id": "usr_…", "name": "Demo Owner", "role": "owner", "orgId": "org_demo" }/v1/auth/logoutanyIn developmentRevoke the current session
{ "ok": true }Agents
An agent is a versioned specification: template, languages, voice, greeting, instructions, tools and escalation rules. Writes require the builder role or higher; publishing requires admin.
/v1/agentsanalyst+In developmentList agents in your organisation
{ "data": [ { "id": "agt_…", "name": "Clinic front desk", "template": "healthcare", "status": "draft", "version": 1 } ] }/v1/agentsbuilder+In developmentCreate an agent
{ "name": "Clinic front desk", "template": "healthcare",
"languages": ["en-IN", "hi-en"], "greeting": "Hello, you've reached…" }{ "id": "agt_8f3k…", "version": 1, "status": "draft", … }/v1/agents/{id}analyst+In developmentGet one agent
{ "id": "agt_…", "name": "…", "spec": { … }, "version": 3, "publishedVersion": 3 }/v1/agents/{id}builder+In developmentUpdate fields; creates a new draft version
{ "greeting": "Namaste! …", "escalation": { "keywords": ["human"] } }{ "id": "agt_…", "version": 4, "status": "draft" }/v1/agents/{id}/publishadmin+In developmentPublish the current version
{ "id": "agt_…", "publishedVersion": 4, "status": "live" }/v1/agents/{id}admin+In developmentDelete an agent
{ "ok": true }Conversations
Text-mode turns run on the same scripted engine as the website demos. The response includes entities, tool calls (against simulated systems) and the decision trace. Audio streaming is planned.
/v1/agents/{id}/converseanalyst+In developmentAdvance a conversation by one caller turn (session: null starts a call)
{ "session": null | { …opaque session… }, "input": "KW-3381-27" }{ "session": { … }, "turn": { "text": "Thanks. Order KW-3381-27 …",
"lang": "en", "entities": [ … ], "toolCalls": [ { "name": "get_order", "status": "ok", … } ],
"trace": [ … ], "outcome": "in_progress" } }/v1/conversationsanalyst+In developmentList stored conversations (filters: agentId, outcome, from, to)
{ "data": [ { "id": "cnv_…", "agentId": "agt_…", "outcome": "resolved", "durationSec": 74 } ], "next": null }/v1/conversations/{id}analyst+In developmentConversation with transcript and tool history
{ "id": "cnv_…", "turns": [ … ], "toolCalls": [ … ] }/v1/realtimeapi keyPlannedBring-your-own-audio streaming session (PCM16 frames in, audio + events out)
→ {"type":"session.start","agentId":"agt_…","sampleRate":16000}
← {"type":"transcript.partial","text":"mujhe appoint…"}
← {"type":"agent.audio","chunk":"<base64>"}Knowledge
Collections of text entries assigned to agents. Search uses keyword (BM25-style) scoring in this preview — not vector search.
/v1/knowledge/collectionsanalyst+In developmentList collections
{ "data": [ { "id": "col_…", "name": "Clinic information", "entries": 4 } ] }/v1/knowledge/collectionsbuilder+In developmentCreate a collection
{ "name": "Return policies", "description": "…" }{ "id": "col_…" }/v1/knowledge/entriesbuilder+In developmentAdd an entry to a collection
{ "collectionId": "col_…", "title": "Return window", "body": "Most items can be returned within 7 days…" }{ "id": "kb_…" }/v1/knowledge/search?q=return+windowanalyst+In developmentKeyword search across collections
{ "data": [ { "entryId": "kb_…", "title": "Return window", "score": 2.31, "snippet": "…" } ] }Simulations
Run Simulation Lab scenarios headlessly — for example from CI before publishing a new agent version.
/v1/simulations/scenariosanalyst+In developmentList built-in scenarios
{ "data": [ { "id": "hc-slot-taken", "template": "healthcare", "assertions": 3 } ] }/v1/simulationsanalyst+In developmentRun scenarios and return assertion results
{ "scenarioIds": ["hc-book-hinglish", "hc-slot-taken"] }{ "passed": 2, "failed": 0, "results": [ { "scenarioId": "hc-slot-taken", "passed": true, … } ] }Audit & health
Every write produces an append-only audit event scoped to your organisation.
/v1/audit-eventsauditor / admin+In developmentList audit events (newest first)
{ "data": [ { "at": "…", "actor": "usr_…", "action": "agent.publish", "target": "agt_…" } ] }/v1/healthpublicIn developmentLiveness and provider configuration (no secrets)
{ "ok": true, "providers": { "asr": "mock", "tts": "mock", "llm": "scripted" } }Errors & limits
400 invalid_request | Body failed validation; message names the field. |
401 unauthenticated | Missing, invalid or expired token. |
403 forbidden | Your role lacks the permission. |
404 not_found | No such resource in your organisation (other organisations’ IDs also return 404). |
429 rate_limited | Default 120 requests/minute per token or IP; see Retry-After. |
The reference server lives in server/ of the website repository. Quickstart