---
title: "Update Document by ID"
method: PATCH
path: "/sign/envelopes/{envelopeID}/documents/{documentID}"
tags: ["Sign"]
---

# Update Document by ID

`PATCH /sign/envelopes/{envelopeID}/documents/{documentID}`

The **Update Document by ID** endpoint allows you to update an existing document's metadata within an envelope.
This endpoint performs a partial update on the document, changing only the provided fields while preserving all other properties.
Currently, only the document name can be updated.

## Path parameters

- `envelopeID` string, uuid, required
- `documentID` string, uuid, required

## Request body

- RenameDocumentRequest
  - `name` string, required — The new name for the document

## Response `200`

Document updated successfully

- union
  - PendingDocumentResponse — Response for a pending document
    - `name` string, required — Name of the file provided by the user.
    - `createdAt` string, date-time — UTC timestamp indicating when the document was created.
    - `status` 'pending' | 'uploaded' | 'failed' | 'signed' | 'sealed' — Current status of the document.
    - `ID` string, uuid, required — Unique uuid identifier for the document.
  - UploadedDocumentResponse — Response for an uploaded document
    - `name` string, required — Name of the file provided by the user.
    - `createdAt` string, date-time — UTC timestamp indicating when the document was created.
    - `status` 'pending' | 'uploaded' | 'failed' | 'signed' | 'sealed' — Current status of the document.
    - `sizeBytes` integer — Size in bytes of the document.
    - `numPages` integer — Number of pages of the document.
    - `ID` string, uuid, required — Unique uuid identifier for the document.

## Other responses

- `400` — Invalid document metadata
- `401` — Unauthorized - Invalid or missing JWT token
- `404` — Document or envelope not found
- `409` — Envelope cannot be modified

---

[API](https://skmtc.net/gonitro/apis/nitro-sign-public-api.md) · [All operations](https://skmtc.net/gonitro/apis/nitro-sign-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gonitro/nitro-sign-public-api/versions/26e3043a365b/schema)
