Skip to content

API reference

Admin endpoints under /v1 accept either the dashboard session cookie or an API key:

Terminal window
curl -H "Authorization: Bearer ak_..." https://YOUR-DEPLOYMENT/v1/bots

Create and revoke keys with POST /v1/api-keys, GET /v1/api-keys, and DELETE /v1/api-keys/:id. A key is shown once, when it is created.

Method and path Purpose
GET /v1/bots List bots.
POST /v1/bots Create a bot. Body: name, and optionally allowedDomains, handoffEmail, handoffSlackWebhook, model, confidenceThreshold.
GET /v1/bots/:id Get a bot.
PATCH /v1/bots/:id Update settings. Send "" or null to clear an optional field.
POST /v1/bots/:id/widget-key Issue a new widget key. The old one stops working.
POST /v1/bots/:id/theme Extract a brand from { "domain": "acme.com" } and save it.
GET /v1/brand?domain=acme.com Preview a brand without saving it.
Method and path Purpose
POST /v1/bots/:id/sources Add a source and start crawling. Body: url, type (url to follow links or sitemap), optional pageCap.
GET /v1/bots/:id/sources List a bot’s sources with status and page counts.
GET /v1/sources/:id/status Crawl status of one source.
POST /v1/sources/:id/recrawl Recrawl. Unchanged pages are skipped.
POST /v1/scrape Convert one URL to Markdown.
Method and path Purpose
GET /v1/conversations List conversations. Filters: botId, status, limit, offset.
GET /v1/conversations/:id A conversation with its messages and citations.
GET /v1/bots/:id/unanswered Unanswered questions. Filters: status (open, resolved, all), limit, offset.
PATCH /v1/unanswered/:id Set status to resolved or open.

The widget uses these. Each needs a widget key and must come from one of the bot’s allowed domains.

Method and path Purpose
GET /public/config Bot name, brand colour, and Turnstile site key.
POST /public/chat Ask a question. Streams Server-Sent Events: meta, delta, then done or error.
POST /public/feedback Thumbs up or down on an answer.
POST /public/handoff Hand off to a person, with the visitor’s email and consent.