Create a document
Updated Dec 2, 2026
POST
/documentsCreates a document and records version 1, so its history is complete from the start.
Authorization
AuthorizationstringHeaderrequiredBearer <token>Authorization: Bearer YOUR_API_KEY. /v2 accepts no other method.
Request body required
application/jsontitlestringrequiredThe slug is derived from this and cannot be set directly.
minLength: 3maxLength: 500contentstringnullableMarkdown. Up to 2MB.
document_typestringA type key defined in this workspace. Seeded with knowledge-base, prd, spec, plan, research, decision, summary, project — a workspace can add or rename them, so an unknown key is rejected with invalid_argument.
Default: "knowledge-base"
tagsstring[]maxItems: 50statusenum<string>Allowed values
"draft""published""archived"Default: "draft"
Responses
Created
statusstringdataDocumentThe published shape of a document. Fields are added over time and never removed — ignore any you do not recognise.
