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 site | CDN widget |
| Build my own chat UI | @elioxa/chat-sdk |
| Read calls, create work, manage config from a server or script | @elioxa/sdk |
| React to events | Webhooks |
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/sdkimport { 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-sdkimport { 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.
| Endpoint | Purpose |
|---|---|
GET /public/chat/availability | Are agents available, estimated wait |
POST /public/chat/session/start | Start a session → sessionId, reconnectToken, greeting |
POST /public/chat/proactive | Start a proactive session |
POST /public/chat/session/:id/message | { text } → updated messages and reply |
GET /public/chat/session/:id | Session status and messages |
POST /public/chat/session/reconnect | { reconnectToken } |
POST /public/chat/session/:id/close | End the session |
GET /public/chat/session/:id/transcript | Transcript |
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>| Attribute | Default | Purpose |
|---|---|---|
data-org-slug | — | Tenant (or use data-location-id) |
data-location-id | — | Specific location |
data-api-base | https://api.elioxa.com | Point 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.