API
Getting your API key#
Open Integrations — reachable from your avatar dropdown in the /chat input,
or your profile dropdown in the admin panel. From there you can view (masked or
revealed), copy, or reset your key.
There is one live key per workspace. Resetting immediately revokes the old one — there is no key history, so update any callers before you reset.
Authentication#
Every request is authenticated with a Bearer token — your workspace's API key.
Authorization: Bearer dbk_<your_api_key>
Keep your key secret — it grants full access to your workspace's AI chat, billed against your account's AI budget (the same budget the docs-chat widget uses; there is no separate API-only quota).
/api/v1/chatAsk a question against your workspace's documentation and get back an answer grounded in your own pages.
Sent as the Authorization header. Your key is used only by your browser for this request — it is never sent to Docsbook or stored.
The question to ask
The doc page slug the question is asked from, to exclude it from its own citations
Answer language code; defaults to the workspace's default language
Groups related questions for analytics and webhooks
Page slugs to force into context
curl -X POST https://docsbook.io/api/v1/chat \
-H "Authorization: Bearer dbk_<your_api_key>" \
-H "Content-Type: application/json" \
-d '{"question": "How do I set a custom domain?"}'{
"answer": "You can set a custom domain from the Branding tab...",
"refs": [{ "pagePath": "design/domains", "title": "Custom Domains", "heading": "Setup" }],
"follow_up_questions": ["What SSL certificate is used?", "Can I use a subdomain?"]
}| Status | Meaning |
|---|---|
401 |
Missing or invalid API key |
403 |
AI chat is not enabled for this workspace |
429 |
The account's AI budget is exhausted |