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

# Update a document

`PATCH /v1beta/documents/{document_id}`

Update document title and description.

## Path parameters

- `document_id` string, required — Document ID to update. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

## Request body

- object — UpdateDocumentRequest specifies fields to update on a document.
  - `description` string, nullable — New description (max 2000 characters).
  - `title` string, nullable — New title (1-255 characters).

## Response `200`

Success

- UpdateDocumentResponse — UpdateDocumentResponse contains the updated document.
  - `document` Document, required — Document represents a Factify document.
    - `access_level` 'private' | 'organization' | 'public', required
    - `created_at` string, date-time, required — Timestamp when document was created.
    - `created_by` Subject, required — Subject is a lightweight reference to either a user or a bot. Used in embedded fields like created_by. For full details, call GetUser or GetBot with the subject's id. subject_type_matches_id_prefix // id prefix must match type (user_ for user, bot_ for bot)
      - `id` string, required — Unique ID. user_xxx for users, bot_xxx for bots.
      - `name` string, required — Display name of the user or bot.
      - `type` 'user' | 'bot', required
    - `current_version` VersionRef — VersionRef is a lightweight reference to a version.
      - `id` string, required — Version ID. Pattern: ver_[0-9a-hjkmnp-tv-z]{26}
    - `description` string, nullable — Optional document description.
    - `general_access` 'private' | 'organization' | 'public'
    - `id` string, required — Unique ID for the document. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}
    - `last_viewed_at` string, date-time — Timestamp when the authenticated user last viewed this document. Absent if the user has never viewed it.
    - `permission_set` DocumentPermissionSet — DocumentPermissionSet contains the permissions the authenticated user has on a document.
      - `attach_policy` boolean
      - `comment_private` boolean
      - `comment_public` boolean
      - `copy_content` boolean
      - `create_version` boolean
      - `export` boolean
      - `grant_access` boolean
      - `list_versions` boolean
      - `manage_access` boolean
      - `open` boolean
      - `screenshot` boolean
      - `trash` boolean
      - `view` boolean
      - `view_analytics` boolean
      - `view_leads` boolean
      - `view_timeline` boolean
    - `processing_status` 'processing' | 'ready' | 'failed', required
    - `shared_at` string, date-time — Timestamp when this document was last shared to the authenticated user. Absent if the document was never shared to them.
    - `thumbnail_url` string — URL of the document thumbnail image.
    - `title` string, required — Document title.
    - `trashed_at` string, date-time — Timestamp when the document was trashed, if applicable. Absent if the document is not trashed.
    - `updated_at` string, date-time — Timestamp when document was last updated.
    - `url` string, uri, required — URL for accessing the document on Factify.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication failed - missing or invalid API key
- `403` — Authorization failed - valid key but insufficient permissions
- `404` — Resource not found
- `429` — Too many requests
- `500` — Internal server error

## Changes

- **2026-03-05** `7af5ad1239eb` — 7 info
  - added the optional property `document/general_access` to the response with the `200` status
  - added the optional property `document/last_viewed_at` to the response with the `200` status
  - added the optional property `document/permission_set` to the response with the `200` status
  - added the optional property `document/shared_at` to the response with the `200` status
  - …3 more
- **2026-03-05** `a7e69986914e` — 2 warning, 4 info
  - added the new `bot` enum value to the `document/created_by/type` response property for the response status `200`
  - added the new `user` enum value to the `document/created_by/type` response property for the response status `200`
  - added discriminator to `document/created_by` response property for the response status `200`
  - removed the `service_account` enum value from the `document/created_by/type` response property for the response status `200`
  - …2 more

[Change history](https://skmtc.dev/factify-inc/apis/factify-api/changes/v1beta/documents/:document_id/patch.md)

---

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