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

# Update Document

`PATCH /documents/{id}`

Update a document by ID.

## Path parameters

- `id` string, uuid, required

## Request body

- DocumentUpdate — Schema for updating a document.
  - `reference` string, nullable — Extraction reference for the document
  - `pmid` string, nullable — The PubMed ID of the document.
  - `doi` string, nullable — The DOI of the document.
  - `file_name` string, nullable — The name of the file.
  - `url` string, nullable — A URL to the PDF document if it is publicly available online.
  - `metadata` object, nullable — Additional metadata for the document

## Response `200`

Successful Response

- DocumentListItem
  - `id` string, uuid, required
  - `workspace_id` string, uuid, required
  - `url` string, required
  - `file_name` string, nullable, required
  - `reference` string, required
  - `pmid` string, nullable, required
  - `doi` string, nullable, required
  - `metadata` object, nullable
  - `thumbnail_url` string, nullable — URL to the document thumbnail image
  - `inserted_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Unprocessable Content
- `500` — Internal Server Error

---

[API](https://skmtc.net/hf/apis/extralit-v1.md) · [All operations](https://skmtc.net/hf/apis/extralit-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hf/extralit-v1/revisions/e9da3a893a88/schema)
