Skip to main content
POST
Create a document

Authorizations

Authorization
string
header
required

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

Body

application/json
title
string
required

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

Required string length: 3 - 500
content
string | null

Markdown. Up to 2MB.

document_type
string
default:knowledge-base

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.

tags
string[]
Maximum array length: 50
status
enum<string>
default:draft
Available options:
draft,
published,
archived

Response

Created

status
string
data
object

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