Create Document
documents:write role.
Request
Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Content-Type | Yes | application/json |
Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Document title (max 500 characters) |
blocks | array | Yes | Array of content blocks |
blocks[].type | string | Yes | Block type: heading, paragraph, code, list, quote, table, image, divider |
blocks[].content | string | Yes | Block content |
blocks[].metadata | object | No | Block metadata (e.g., level for headings) |
folder_id | string | No | Target folder ID. Uses root folder if omitted. |
content_type | string | No | Default: "markdown" |
visibility | string | No | "private" (default) or "public" |
metadata | object | No | Document-level metadata |
Example
Response
Status: 201 CreatedQuota Headers
Responses include document quota information:| Header | Description |
|---|---|
X-Quota-Used | Documents created this month |
X-Quota-Limit | Monthly document limit |
X-Quota-Reset | Date when quota resets (YYYY-MM-DD) |