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

# Update a document

`PATCH /v1/documents/{id}/`

## Request

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

Rename it or replace its tags.

## Path parameters

- `id` string, required

## Request body

- object
  - `title` string
  - `tags` string[]

## Response `200`

Update a document

- Document
  - `object` 'document', required
  - `id` string, required
  - `title` string, required
  - `kind` 'document' | 'template' | 'form', required
  - `status` 'draft' | 'completed' | 'archived', required
  - `pageCount` integer, required
  - `tags` string[], required
  - `folderId` string, nullable, required
  - `sourceName` string, nullable, required
  - `sourceSize` integer, nullable, required
  - `createdFromTemplate` string, nullable, required: Library template slug or user template id this document was created from
  - `createdAt` string, required: ISO 8601 timestamp (UTC)
  - `updatedAt` string, required: ISO 8601 timestamp (UTC)

## Other responses

- `400`: Invalid request (see `error.details.issues`)
- `401`: Missing or invalid API key
- `402`: Your plan doesn't include this (API access needs Business) or a monthly allowance is used up
- `403`: The API key lacks the required scope
- `404`: Not found (or not yours)
- `409`: Conflict with the current state
- `422`: Validation failed
- `429`: Rate limited — see RateLimit-* and Retry-After

---

[API](https://skmtc.dev/pdfbetter/apis/pdfbetter-api.md) · [All operations](https://skmtc.dev/pdfbetter/apis/pdfbetter-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pdfbetter/apis/pdfbetter-api/revisions/6960b18754a8?raw)
