Document

Create a document

Updated Dec 2, 2026

POST/documents

Creates a document and records version 1, so its history is complete from the start.

Authorization

AuthorizationstringHeaderrequired
Bearer <token>

Authorization: Bearer YOUR_API_KEY. /v2 accepts no other method.

Request body required

application/json
titlestringrequired

The slug is derived from this and cannot be set directly.

minLength: 3maxLength: 500
contentstringnullable

Markdown. Up to 2MB.

document_typestring

A 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: 50
statusenum<string>
Allowed values"draft""published""archived"
Default: "draft"

Responses

Created

statusstring
dataDocument

The published shape of a document. Fields are added over time and never removed — ignore any you do not recognise.