---
title: "Update a document"
method: PATCH
path: "/documents/{id}"
---

# Update a document

`PATCH /documents/{id}`

## Request

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

Updates one or more fields of an existing document. Only include the fields you want to change.

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateDocumentRequest
  - `title` string
  - `content` string
  - `template_id` string
  - `theme_mode` 'light' | 'dark'
  - `description` string, nullable
  - `page_width` 'standard' | 'wide' | 'full'

## Response `200`

Document updated

- UpdateDocumentResponse
  - `id` string, uuid
  - `title` string
  - `template_id` string
  - `theme_mode` string
  - `page_width` string, nullable
  - `updated_at` string, date-time

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Insufficient permissions or tier
- `404`: Resource not found
- `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)
