← All docs

Developers

Developers

Build on the voice operations layer. Two npm packages, a public chat API, a drop-in widget, and webhooks.

Every call has a job. Let it get done.

Pick your path

I want to…Use
Drop a chat button on a siteCDN widget
Build my own chat UI@elioxa/chat-sdk
Read calls, create work, manage config from a server or script@elioxa/sdk
React to eventsWebhooks

API base: https://api.elioxa.com. Demo org slug: elioxa-demo.

@elioxa/sdk

Typed REST client. Zero dependencies, native fetch (Node 18+ and browsers).

npm install @elioxa/sdk
import { ElioxaClient } from "@elioxa/sdk";

const client = new ElioxaClient({ apiKey: process.env.ELIOXA_API_KEY });
const calls = await client.listCalls({ limit: 25 });
await client.createWorkItem("loc_123", { title: "Call back customer", priority: "high" });
const { text } = await client.maskText("loc_123", "Card 4111 1111 1111 1111", "chat");

Auth: Authorization: Bearer <token> or X-Api-Key. Errors throw ElioxaApiError (status, body). Full method table: packages/sdk/README.md. Anything not wrapped: client.raw(method, path, body).

@elioxa/chat-sdk

Headless chat SDK for web chat sessions (initialize, startChat, sendMessage, getMessages, closeChat, reconnect, context provider, proactive chat, transcript).

npm install @elioxa/chat-sdk
import { ElioxaChatSDK } from "@elioxa/chat-sdk";

const chat = new ElioxaChatSDK({ orgSlug: "elioxa-demo" });
await chat.initialize();
chat.on("message", (m) => console.log(m.sender, m.text));
chat.setContextProvider(() => ({ page: location.href }));
await chat.startChat({ visitor: { name: "Sam" } });
await chat.sendMessage("Do you have a room on Friday?");
setInterval(() => chat.getMessages().catch(() => {}), 2000);

Reference: packages/chat-sdk/README.md. Browser global (window.ElioxaChatSDK) via src/browser.ts.

Public chat API

No auth. Identify the tenant with orgSlug, locationId, or widgetId.

EndpointPurpose
GET /public/chat/availabilityAre agents available, estimated wait
POST /public/chat/session/startStart a session → sessionId, reconnectToken, greeting
POST /public/chat/proactiveStart a proactive session
POST /public/chat/session/:id/message{ text } → updated messages and reply
GET /public/chat/session/:idSession status and messages
POST /public/chat/session/reconnect{ reconnectToken }
POST /public/chat/session/:id/closeEnd the session
GET /public/chat/session/:id/transcriptTranscript

Messages are masked with the location's masking rules before storage and in replies. Pre-chat survey answers create a work item.

Embed widget

<script src="https://elioxa.com/sdk/widget.js" data-org-slug="elioxa-demo" async></script>
AttributeDefaultPurpose
data-org-slug—Tenant (or use data-location-id)
data-location-id—Specific location
data-api-basehttps://api.elioxa.comPoint at another API

Floating button, session start on open, reconnectToken kept in sessionStorage. JS API: window.ElioxaWidget.open(), .close(), .startProactive(). Vanilla JS, no build step. More in sdk.md.

Webhooks

Per-location secret, delivery logs in the portal (/admin/webhooks). Events cover orders, calls, follow-ups (send_followup), alerts, and CRM case sync. Verify the secret on receipt; respond 2xx fast and queue work.

Inbound: WhatsApp, SMS, social (/public/channels/*), POS inventory webhooks, email inbound.

Voice contract

The voice path (AudioSocket → Azure Voice Live) is defined in infra/voice/contract.yaml. Tools, language locks, and silence behaviour are configured by admins, not by SDK calls.