---
title: "Write a Flow document"
method: PUT
path: "/v1/documents/{uuid}"
tags: ["Documents"]
---

# Write a Flow document

`PUT /v1/documents/{uuid}`

## Request

- Base URL: `https://contentmaschine.ai/api`
- URL: `https://contentmaschine.ai/api/v1/documents/{uuid}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://contentmaschine.ai/api/oauth/authorize`, token URL `https://contentmaschine.ai/api/oauth/token`)

The full write. This is the non-interactive substitute for the editor autosave, which is deliberately not on this API - it is the same ownership check and the same model.

## Path parameters

- `uuid` string, uuid, required

## Request body

- object
  - `title` string: New title.
  - `content` string: New content.
  - `status` string: New status.

## Response `200`

The updated document.

- object
  - `success` boolean
  - `data` object
    - `document` object
  - `timestamp` string, date-time

## Other responses

- `400`: Malformed body.
- `401`: Missing or invalid API key.
- `404`: Unknown document, or not yours.
- `default`: Any other error. Every failure this API emits uses the same envelope; branch on `error.type`, never on `error.message`, and quote `error.correlation_id` to support.

---

[API](https://skmtc.dev/contentmaschine/apis/contentmaschine-ai-api.md) · [All operations](https://skmtc.dev/contentmaschine/apis/contentmaschine-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contentmaschine/apis/contentmaschine-ai-api/revisions/28c74f46051c?raw)
