---
title: "Update a Document"
method: PATCH
path: "/signature_requests/{signatureRequestId}/documents/{documentId}"
tags: ["Document"]
---

# Update a Document

`PATCH /signature_requests/{signatureRequestId}/documents/{documentId}`

Updates a given Document. Any parameters not provided are left unchanged.

## Path parameters

- `signatureRequestId` string, uuid, required — The unique identifier for a resource.
- `documentId` string, uuid, required — The unique identifier for a resource.

## Request body

- UpdateDocument
  - `nature` 'attachment' | 'signable_document' — Files in JPEG, JPG, and PNG format can only be of attachment nature.
  - `insert_after_id` string, uuid, nullable — Insert just after the position of the specified document id
  - `password` string — The password required to unlock the document if it is protected
  - `name` string — The new name to be assigned to the document. This value should contain any characters except "\", "/" and can\'t start and finish with a space.
  - `initials` InitialsArea
    - `alignment` 'left' | 'right' | 'center' | 'top-left' | 'top-right' | 'top-center' | 'bottom-left' | 'bottom-right' | 'bottom-center', required — Alignment of the Initials on the document. The `left`, `right` and `center` options are aligned on top of the page by default.
    - `y` integer, required — Offset of the initials from the edge of the page (in pixels). The offset is from the top or bottom of the page, depending on what has been defined in the `alignment` attribute.
  - `excluded_approvers` string[] — List of Approver IDs who cannot see this Document. When omitted, all Approvers can see it (default). Only available when the document_visibility feature is enabled on the organization.
  - `excluded_signers` string[] — List of Signer IDs who cannot see this Document. When omitted, all Signers can see it (default). Requires the document_visibility feature to be enabled on the organization.

## Response `200`

OK

- Document — Document to attach to a Signature Request
  - `id` string, uuid, required
  - `filename` string, required
  - `nature` 'attachment' | 'signable_document', required
  - `content_type` string, required
  - `sha256` string, required — Sha256 checksum
  - `is_protected` boolean, required
  - `is_signed` boolean, required
  - `created_at` string, date-time, required
  - `total_pages` integer, nullable, required — Number of pages for signable document
  - `is_locked` boolean, required — If protected by password and not yet unlocked
  - `initials` DocumentInitials, nullable, required
    - `alignment` 'left' | 'center' | 'right', required — Alignment of the initials on the document’s pages.
    - `y` integer, required — Y-axis position of the initials on the first page of the document.
    - `per_page` DocumentInitialsPerPageInner[], required
      - `page` integer, required — Page number.
      - `y` integer, required — Y-axis position of the initials on the page.
  - `total_anchors` integer, required — Number of parsed anchors from the document.
  - `excluded_approvers` string[], required — List of Approver IDs who cannot see this Document.
  - `excluded_signers` string[], required — List of Signer IDs who cannot see this Document.

## Other responses

- `400` — Bad request
- `401` — Access unauthorized
- `403` — Access forbidden
- `404` — Resource not found
- `405` — This method is not allowed
- `415` — UnsupportedMediaType
- `429` — Too Many Requests, please try again later.
- `500` — Internal Server Error

---

[API](https://skmtc.net/yousign/apis/public-api-v3.md) · [All operations](https://skmtc.net/yousign/apis/public-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/yousign/public-api-v3/revisions/8d258c0b45d6/schema)
