---
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

## Changes

> 7 revisions in range; 1 could not be searched.

- **2026-01-30** `9404aa4fdc22` — 1 breaking
  - api removed without deprecation

[Change history](https://skmtc.dev/brainfish-ai/apis/reasondb-api/changes/v1/documents/:id/patch.md)

---

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