Ask the documentation a question
/api/v1/chatAsk this workspace's documentation a question and get one grounded answer back, with the pages it was drawn from. This is the same retrieval and the same model call the Ask AI widget on the published docs site makes — not a second engine — so an answer here and an answer there agree, and a fix to one is a fix to both.
The call spends from the workspace's own AI budget, the same wallet the widget spends from. There is no separate API quota.
Your API key, sent as Authorization: Bearer dbk_YOUR_API_KEY.Sent as the Authorization header. Your key is used only by your browser for this request — it is never sent to Docsbook or stored.
What to ask the documentation.
The page the reader is on, so the answer can prefer nearby context.
Answer in this language. Defaults to the workspace's default language.
Groups several calls as one conversation, the way a multi-turn chat is.
Page paths to put in front of the model regardless of what retrieval finds.
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 connect a custom domain?","currentPath":"guides/advanced/custom-domain"}'Responses#
| Status | Meaning |
|---|---|
200 |
The grounded answer, its sources, and suggested follow-up questions. |
400 |
question was missing or empty. |
401 |
Missing or invalid API key. |
403 |
AI chat is switched off for this workspace. |
429 |
The workspace's AI spend budget is exhausted. |