---
title: "API · Docs · Create a long-form document"
method: POST
path: "/api/v1/documents"
tags: ["documents"]
---

# API · Docs · Create a long-form document

`POST /api/v1/documents`

## Request

- Base URL: `https://api.simplified.com`
- URL: `https://api.simplified.com/api/v1/documents`
- Auth: API key in header `Authorization`

Create a new long-form document rendered in the Quill editor.
Content is stored as Quill Delta JSON (ops array). Used by
AI-writer skills (Essay Writer, Article Writer) to persist
generated markdown content into an editable document.

The returned document is immediately openable at
`/ai-writer/document/{space_or_organization}/{id}` in the Simplified web app.

To convert markdown content into the required Quill Delta
shape, call `markdown_to_quill_delta` from the writers toolkit
before passing to this endpoint.

## Request body

- CreateDocumentRequest
  - `title` string, required: Document title shown in the editor and the document list. For AI-writer skills, use the essay/article title from the originating show_article tool call.
  - `form` integer, required: Document form type enum. Use 1 for LONG_FORM (Quill-editor-backed documents — the standard for essays, articles, and any rich-text content). 0 = SHORT_FORM (AI templates, not used by these skills).
  - `payload` CreateDocumentRequestPayload: Optional document metadata. Can be left empty ({}). Supported fields: description, tone, keywords, voice_id, output. Used for AI template context — not required for skill-generated content.
  - `content` CreateDocumentRequestContent, required: Quill Delta JSON representing the document body. Contains an `ops` array of operations. Each op is a dict with `insert` (string or embed object) and optional `attributes` (formatting like bold, italic, header, list, link, code-block, blockquote). For markdown-sourced content, call `markdown_to_quill_delta` to produce a compliant Delta before passing to this field.
    - `ops` CreateDocumentRequestContentOpsItems[], required: Delta operations array
  - `parent` string: Optional parent document id for creating a sub-document. Not used by AI-writer skills in v1.

## Response `201`

Document created — returns document id plus workspace context

- unknown

## Other responses

- `400`: Invalid payload (missing title, content, or malformed Delta)
- `401`: Unauthorized

---

[API](https://skmtc.dev/simplified/apis/platform.md) - [All operations](https://skmtc.dev/simplified/apis/platform/llms.txt) - [OpenAPI document](https://skmtc.dev/simplified/apis/platform/revisions/0815a1ba1e4e?raw)
