Snakkbar developer documentation
Snakkbar is an AI customer chat with live human takeover. A business (a tenant) gets an AI assistant that answers from its website and documents, and its staff (operators) can step into any conversation, several at a time. Staff also see who is on the site right now (live visitors, with a live view of a visitor's cursor and scroll) and an overview of traffic and chats.
Everything is available three ways. Pick per surface (visitor side and staff side independently):
| Level | Visitor side | Staff side | Effort |
|---|---|---|---|
| Stock UI | One <script> tag: the chat bubble | mountAdmin(element, …): the full inbox inside your own admin | Minutes |
| SDK | createVisitorClient() + your own UI (React hooks included) | createOperatorClient() + your own UI | Days |
| HTTP API | /api/v1/visitor/* + SSE | /api/v1/operator/* + SSE | Any language |
The stock UIs are built on the SDK, and the SDK only uses the public HTTP API. Anything the stock UIs do, your own UI can do.
Start here
- Implementing Snakkbar in a site as an AI agent? Read agent-guide.md and follow it top to bottom.
- Concepts — tenants, visitors and their profiles, live visitors, operators, conversations, the assistant, handoff, the overview.
- Visitor widget — the script tag, options, JavaScript API (
setUser,identify), live visitors and consent, theming. - Admin UI in your own app — token exchange,
mountAdmin, and building your own live view. - Headless with the SDK — build your own chat UI and/or inbox, tracking, live visitors, dashboard.
- HTTP API reference — every endpoint, auth scheme and error code.
- Realtime — the event streams, how to stay in sync, live-visitor cadence.
- Security — tokens, origins, keys, visitor profiles, what live visitors collect, rate limits and data retention.
Hosts
| Thing | URL |
|---|---|
Snakkbar host (<host> in these docs) | https://www.snakkbar.app |
| Widget | <host>/widget.js |
| Admin bundle | <host>/admin.js |
| SDK (ESM) | <host>/sdk/snakkbar.mjs, <host>/sdk/react.mjs |
| API | <host>/api/v1 |
| Hosted staff panel | <host>/panel |
| Machine-readable index of these docs | <host>/llms.txt |
Alle sider
Kom i gang
- BegreperProfile. A visitor can carry name, email, phone, company and up to 30 custom attributes (e.g. customer number, plan). Your backend sets them, trusted, with the visitor token; …
- Guide for AI-agenterYou are an agent with control over a website's code and want to add Snakkbar to it. Follow these steps in order. Every step ends with a check; do not move on until it passes.
Integrasjon
- Chat-widgetenThe stock chat bubble. One script tag, no build step, no CSS to import.
- Admin i egen appPut the full Snakkbar inbox inside a customer's existing admin/back office. Their staff stay in their own system, logged in with their own accounts; Snakkbar never shows a login.
- SDK (headless)@snakkbar/sdk is a small, dependency-free TypeScript client for the HTTP API, plus optional React hooks. Use it to build your own chat UI, your own staff inbox, or both.
- HTTP-APIBase URL: https://<host/api/v1. JSON request and response bodies (content-type: application/json) unless noted. Times are ISO 8601. Response shapes are the TypeScript types in …
- SanntidSnakkbar pushes small doorbell events; you fetch the actual content over HTTP. That keeps the stream cheap, makes missed events harmless (just refetch), and means one code path …
- WebhooksSnakkbar can POST every event in a tenant (a new conversation, a request for a person, a callback request, a message, an erased visitor, …) to your own HTTPS endpoints as it …
Funksjoner
- Proaktiv chatSnakkbar can start the conversation instead of waiting for the visitor:
- Varsler og e-postWhen a visitor asks for a person, leaves a callback request or starts a conversation and nobody has the inbox open, Snakkbar tells people:
- Verktøy for teametTools for the team in the inbox: saved replies, internal notes, tags, search and routing to departments. All of them are in the stock admin, in the SDK's OperatorClient and in …
- SvarkvalitetWhat visitors think of the assistant's answers, and a queue of conversations staff should look at.
- Kunnskap og PDF-erHow documents become searchable for sokdokumenter, and how PDFs on the customer's website are indexed automatically.
Sikkerhet og drift
- Sikkerhet og dataCollected: the page URL and title; the referrer as origin and path only; tab visibility; viewport size, scroll position and page height; the user agent (shown as device type, …
- PersonvernTools for GDPR-style requests and consent, and for keeping bots out of the visitor list.
- SystemeierSnakkbar's own staff (platform admins, rows in platformadmins) run every customer from the Systemeier view of the hosted panel (/panel). It is only shown to, and its API only …