---
title: "Update a document"
method: PATCH
path: "/v1/documents/{id}"
tags: ["documents"]
---

# Update a document

`PATCH /v1/documents/{id}`

Partially updates a document's title, table assignment, tags, or metadata. Only provided fields are changed. `metadata` is merged key-by-key, not replaced wholesale.

## Path parameters

- `id` string, required

## Request body

- UpdateDocumentRequest — Request body for updating a document. All fields are optional; only provided fields are changed.
  - `title` string — Updated document title
  - `table_id` string — Move document to a different table
  - `tags` string[] — Document tags (replaces existing tags)
  - `metadata` object — Metadata to merge (key-by-key, not replaced wholesale)

## Response `200`

Document updated

- object
  - `updated` boolean
  - `document_id` string

## Other responses

- `404` — Document not found
- `500` — Storage error

---

[API](https://skmtc.net/brainfish-ai/apis/reasondb-api.md) · [All operations](https://skmtc.net/brainfish-ai/apis/reasondb-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brainfish-ai/reasondb-api/versions/f8665c1a5239/schema)
