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

# Update Document

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

Use the PATCH method to update a PandaDoc document.

> 🚧 Document status
> 
> You can only update a document in the Draft status (`document.draft`). 
> 
> After creating a new document, it usually retains a `document.uploaded` status for 3-5 seconds while the document syncs across PandaDoc servers. When the document is available for further API calls, the document moves to the `document.draft` state. Use [Document Status](https://developers.pandadoc.com/reference/document-status) or Webhooks to check document status.

## Path parameters

- `id` string, required

## Request body

- DocumentUpdateRequest
  - `name` string — The name of the document.
  - `recipients` UpdateDocumentActor[] — The list of recipients you're sending the document to. The ID or email are required. If the ID is passed, an existing recipient will be updated. If the email is passed, a new recipient will be added to CC.
    - union
      - UpdateDocumentRecipient
        - `email` string, nullable — A recipient's email address.
        - `phone` string, nullable — A recipient's phone number.
        - `first_name` string, nullable — A recipient's first name. We automatically take the first name from contact data if this field is missed.
        - `last_name` string, nullable — A recipient's last name. We automatically take the last name from contact data if this field is missed.
        - `id` string
        - `delivery_methods` RecipientDeliveryMethods, nullable
          - `email` boolean
          - `sms` boolean
        - `redirect` RecipientRedirect
          - `is_enabled` boolean, required
          - `url` string, nullable, required — A URL to redirect to after the document is signed.
        - `type` 'recipient'
        - `signing_order` integer, nullable — Set a signing order for a recipient. Pass `null` for all recipients to disable the signing order. Learn more: https://developers.pandadoc.com/docs/set-signing-order
      - UpdateDocumentRecipientGroup
        - `id` string
        - `name` string, required
        - `type` 'recipient_group'
        - `members` BaseIdentity[]
          - `email` string, nullable — A recipient's email address.
          - `phone` string, nullable — A recipient's phone number.
          - `first_name` string, nullable — A recipient's first name. We automatically take the first name from contact data if this field is missed.
          - `last_name` string, nullable — A recipient's last name. We automatically take the last name from contact data if this field is missed.
        - `signing_order` integer, nullable — Set a signing order for a recipient group. Pass `null` for all recipients to disable the signing order. Learn more: https://developers.pandadoc.com/docs/set-signing-order
  - `fields` DocumentUpdateRequestField — Set specific values to the fields. This object maps merge field names to their corresponding values. Each key represents a merge field name, and each value is an object containing the data to populate that field with. The structure allows you to pre-populate various field types including text inputs, checkboxes, dropdowns, and date fields. **Key Points:** - Keys must match the exact merge field names from your template or file. - Values must be wrapped in an object with a `value` property. - Supported value types: string, number, boolean. - Date fields should use RFC 3339 format (e.g., '2019-12-31T00:00:00.000Z'). - Signature fields cannot be pre-filled. **Example Usage:** - Text field: `"CustomerName": {"value": "John Doe"}` - Checkbox: `"AgreeToTerms": {"value": true}` - Date field: `"DeliveryDate": {"value": "2019-12-31T00:00:00.000Z"}`
  - `tokens` object[] — Create or initialize multiple variables with their values using tokens/values list.
    - `name` string, required
    - `value` string, required
  - `tags` string[] — Mark your document with one or several tags.
  - `metadata` object — You can pass arbitrary data in the key-value format to associate custom information with a document. This information is returned in any API requests for the document details by id. If metadata exists in a document then the value will be updated. Otherwise, metadata will be added to the document.
  - `pricing_tables` PricingTableRequest[]
    - `name` string, required
    - `data_merge` boolean — When set to true all field names in data rows must be passed as external names defined in the template.
    - `options` object
    - `sections` object[]
      - `title` string, required
      - `default` boolean
      - `multichoice_enabled` boolean
      - `rows` object[]
        - `options` object
          - `qty_editable` boolean
          - `optional_selected` boolean
          - `optional` boolean
        - `data` object
        - `custom_fields` object
  - `tables` TableRequest[]
    - `name` string, required — Name of the table.
    - `data` object, required
      - `sections` object[], required
        - `header` TableCell[], required
          - `text` string, required — Cell text.
          - `col_span` integer, nullable — Represents how many columns the cell occupies.
          - `row_span` integer, nullable — Represents the number of rows the cell occupies.
        - `rows` array[], required
          - TableCell[]
            - `text` string, required — Cell text.
            - `col_span` integer, nullable — Represents how many columns the cell occupies.
            - `row_span` integer, nullable — Represents the number of rows the cell occupies.
  - `images` object[] — You can pass a list of images to image blocks (one image in one block) for replacement.
    - `urls` string[], required
    - `name` string, required
  - `texts` object[] — You can pass a list of texts to text blocks for replacement.
    - `name` string, required — The name of the text block to update.
    - `data` string, required — The rich text content to be inserted into the block. Supports markdown.

## Response `204`

No content

## Other responses

- `400` — Bad Request
- `401` — Authentication error
- `403` — Permission error
- `404` — Not found
- `423` — Document is locked for editing
- `429` — Too Many Requests

---

[API](https://skmtc.net/pandadoc/apis/pandadoc-public-api.md) · [All operations](https://skmtc.net/pandadoc/apis/pandadoc-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pandadoc/pandadoc-public-api/versions/0c2b70be3fb0/schema)
