Set doc status
/api/v1/set_doc_statusMove ONE documentation page through its lifecycle — the call for 'this spec is approved', 'freeze this decision record', 'mark the old guide deprecated', «эту страницу утвердили», «заморозь», «пометь устаревшей». Statuses: generated — A machine wrote this page and no human has read it yet. draft — Someone is still writing it. Not ready to be read as settled. review — Waiting for a human to read it and decide. approved — A human read this version and signed off. Safe to build work from. Agents may build from it. locked — Frozen on purpose. Agents may read it and build from it, but may not rewrite it. Agents may build from it. deprecated — Superseded. Kept so its links keep working, not to be relied on. archived — History. Neither built from nor edited. Each page also carries a version, bumped automatically by every write that changes its text. That is not a bug to work around by re-approving in the same breath — re-approve after somebody has read the new text. Not every move is legal: from each status only the ones listed for it (get_doc_outline shows where every page sits).
Price — $0.00001 per call (twice what serving it costs us), charged to the workspace balance, the same as over MCP.
Also reachable by name at POST /api/v1/tools/set_doc_status.
Authorization: Bearer dbk_YOUR_API_KEY.Sent from your browser straight to the API — never to Docsbook, never stored.generated, draft, review, approved, locked, deprecated, archived.200 with ok: false: the call was made and billed, and that refusal is its answer.Show child attributes8
- Writes to it are refused.
- Writes to it are refused.
- 🔴 APPROVAL IS OF A VERSION, NOT OF A PAGE: editing an approved page sends it back to
review, because the sign-off was of the text that just changed. - 🔴 This is the only way to reach
approvedorlocked. write_docscannot set them, so an agent can never approve its own output as part of writing it.- REQUIRES a read-write MCP token.
ok to see whether it succeeded.curl -X POST 'https://docsbook.io/api/v1/set_doc_status' \
-H 'Authorization: Bearer dbk_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"status":"generated"}'{
"ok": true,
"result": {
"path": "<path>",
"from": "<from>",
"to": "<to>",
"version": "<version>",
"lifecycle": {},
"unchanged": true,
"commitSha": "<commitSha>",
"pullRequest": {}
},
"duration_ms": 0
}