API reference · v1 developer preview

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.

Implemented in reference serverPlanned

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.

POST/v1/auth/loginpublicIn development

Exchange email + password for a session token

REQUEST BODY
{ "email": "owner@demo.syvix.test", "password": "••••••••" }
RESPONSE
{ "token": "eyJ…", "expiresAt": "2026-11-19T21:40:00Z",
  "user": { "id": "usr_…", "role": "owner", "orgId": "org_demo" } }
GET/v1/meanyIn development

Current user and organisation

RESPONSE
{ "id": "usr_…", "name": "Demo Owner", "role": "owner", "orgId": "org_demo" }
POST/v1/auth/logoutanyIn development

Revoke the current session

RESPONSE
{ "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.

GET/v1/agentsanalyst+In development

List agents in your organisation

RESPONSE
{ "data": [ { "id": "agt_…", "name": "Clinic front desk", "template": "healthcare", "status": "draft", "version": 1 } ] }
POST/v1/agentsbuilder+In development

Create an agent

REQUEST BODY
{ "name": "Clinic front desk", "template": "healthcare",
  "languages": ["en-IN", "hi-en"], "greeting": "Hello, you've reached…" }
RESPONSE
{ "id": "agt_8f3k…", "version": 1, "status": "draft", … }
GET/v1/agents/{id}analyst+In development

Get one agent

RESPONSE
{ "id": "agt_…", "name": "…", "spec": { … }, "version": 3, "publishedVersion": 3 }
PATCH/v1/agents/{id}builder+In development

Update fields; creates a new draft version

REQUEST BODY
{ "greeting": "Namaste! …", "escalation": { "keywords": ["human"] } }
RESPONSE
{ "id": "agt_…", "version": 4, "status": "draft" }
POST/v1/agents/{id}/publishadmin+In development

Publish the current version

RESPONSE
{ "id": "agt_…", "publishedVersion": 4, "status": "live" }
DELETE/v1/agents/{id}admin+In development

Delete an agent

RESPONSE
{ "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.

POST/v1/agents/{id}/converseanalyst+In development

Advance a conversation by one caller turn (session: null starts a call)

REQUEST BODY
{ "session": null | { …opaque session… }, "input": "KW-3381-27" }
RESPONSE
{ "session": { … }, "turn": { "text": "Thanks. Order KW-3381-27 …",
  "lang": "en", "entities": [ … ], "toolCalls": [ { "name": "get_order", "status": "ok", … } ],
  "trace": [ … ], "outcome": "in_progress" } }
GET/v1/conversationsanalyst+In development

List stored conversations (filters: agentId, outcome, from, to)

RESPONSE
{ "data": [ { "id": "cnv_…", "agentId": "agt_…", "outcome": "resolved", "durationSec": 74 } ], "next": null }
GET/v1/conversations/{id}analyst+In development

Conversation with transcript and tool history

RESPONSE
{ "id": "cnv_…", "turns": [ … ], "toolCalls": [ … ] }
WS/v1/realtimeapi keyPlanned

Bring-your-own-audio streaming session (PCM16 frames in, audio + events out)

RESPONSE
→ {"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.

GET/v1/knowledge/collectionsanalyst+In development

List collections

RESPONSE
{ "data": [ { "id": "col_…", "name": "Clinic information", "entries": 4 } ] }
POST/v1/knowledge/collectionsbuilder+In development

Create a collection

REQUEST BODY
{ "name": "Return policies", "description": "…" }
RESPONSE
{ "id": "col_…" }
POST/v1/knowledge/entriesbuilder+In development

Add an entry to a collection

REQUEST BODY
{ "collectionId": "col_…", "title": "Return window", "body": "Most items can be returned within 7 days…" }
RESPONSE
{ "id": "kb_…" }
GET/v1/knowledge/search?q=return+windowanalyst+In development

Keyword search across collections

RESPONSE
{ "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.

GET/v1/simulations/scenariosanalyst+In development

List built-in scenarios

RESPONSE
{ "data": [ { "id": "hc-slot-taken", "template": "healthcare", "assertions": 3 } ] }
POST/v1/simulationsanalyst+In development

Run scenarios and return assertion results

REQUEST BODY
{ "scenarioIds": ["hc-book-hinglish", "hc-slot-taken"] }
RESPONSE
{ "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.

GET/v1/audit-eventsauditor / admin+In development

List audit events (newest first)

RESPONSE
{ "data": [ { "at": "…", "actor": "usr_…", "action": "agent.publish", "target": "agt_…" } ] }
GET/v1/healthpublicIn development

Liveness and provider configuration (no secrets)

RESPONSE
{ "ok": true, "providers": { "asr": "mock", "tts": "mock", "llm": "scripted" } }

Errors & limits

400 invalid_requestBody failed validation; message names the field.
401 unauthenticatedMissing, invalid or expired token.
403 forbiddenYour role lacks the permission.
404 not_foundNo such resource in your organisation (other organisations’ IDs also return 404).
429 rate_limitedDefault 120 requests/minute per token or IP; see Retry-After.

The reference server lives in server/ of the website repository. Quickstart