Skip to content

Admin API

Everything in the admin panel is also available over the API: knowledge and catalog sources, prompts and skills, settings, conversations and analytics. Use it to automate set-up, sync settings across stores, or pull conversations into your own tools. The full list of endpoints is in the API reference.

https://api.example.com/v1/admin/…
Authorization: Bearer ck_…

The admin key (ck_…) is shown once when your account is created, and again when you rotate it in Settings → Keys. Keep it on your server: it can change everything in your account. Never put it in a page or an app.

Key Looks like Where it goes
Admin key ck_ + 48 characters Your server only
Publishable key pk_ + 32 characters The embed snippet; it is public
Visitor secret 64 characters Your server only; signs visitor tokens

Rotating the visitor secret signs every customer out of the chat until your site sends a new token.

Terminal window
# Your account and settings
curl -H "Authorization: Bearer $ADMIN_KEY" https://api.example.com/v1/admin/tenant
# Add your sitemap as a knowledge source
curl -X POST -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
-d '{"name":"Website","type":"sitemap","sitemapUrl":"https://shop.example.com/sitemap.xml"}' \
https://api.example.com/v1/admin/knowledge/sources
# Latest conversations
curl -H "Authorization: Bearer $ADMIN_KEY" "https://api.example.com/v1/admin/conversations?limit=20"
# Change one setting (only the fields you send are changed)
curl -X PATCH -H "Authorization: Bearer $ADMIN_KEY" -H "Content-Type: application/json" \
-d '{"answerLength":"short"}' https://api.example.com/v1/admin/tenant

PATCH /v1/admin/tenant with theme replaces the whole theme; send every theme field you want to keep.

JSON in, JSON out. Lists return an array and the total in the X-Total-Count header.

Status Meaning
400 The request is malformed
401 Missing or wrong admin key, or the account is suspended
403 Your plan does not include this, or a plan limit is reached (for example the number of skills)
404 Not found in your account
409 Conflicts with something that exists, such as a duplicate name
422 A field is invalid; the body lists which ones
429 Too many requests; wait and retry

Up to 100 requests per second. Knowledge and catalog imports run in the background: after creating or re-indexing a source, poll the source until its status is ready or failed.

The chat itself uses /v1/public/… with the publishable key and a visitor token. You do not need to call it: the embed script does. It is listed in the reference for completeness.