---
title: "Create a new document"
method: POST
path: "/documents"
---

# Create a new document

`POST /documents`

## Request

- Base URL: `https://api.unmarkdown.com/v1`
- URL: `https://api.unmarkdown.com/v1/documents`
- Auth: HTTP bearer

Creates a new document saved to your account. The document is not published. Use POST /documents/{id}/publish to publish it, or use POST /documents/publish to create and publish in one call.

## Request body

- CreateDocumentRequest
  - `title` string: Document title
  - `content` string: Markdown content
  - `template_id` string: Template ID
  - `theme_mode` 'light' | 'dark'

## Response `201`

Document created

- CreateDocumentResponse
  - `id` string, uuid
  - `title` string
  - `template_id` string
  - `theme_mode` string
  - `created_at` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Insufficient permissions or tier
- `429`: Rate limit or quota exceeded
- `500`: Internal server error

---

[API](https://skmtc.dev/unmarkdown/apis/unmarkdown-api.md) · [All operations](https://skmtc.dev/unmarkdown/apis/unmarkdown-api/llms.txt) · [OpenAPI document](https://skmtc.dev/unmarkdown/apis/unmarkdown-api/revisions/9eb23eef75d6?raw)
