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 or Webhooks to check document status.

Servers

Path parameters

Name Type Required Description
id String Yes

Document ID

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
name String No

The name of the document.

recipients[] Array No

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.

pricing_tables[] Array No
pricing_tables[].name String Yes
pricing_tables[].sections[] Array No
pricing_tables[].sections[].multichoice_enabled Boolean No

Default value: false

pricing_tables[].sections[].default Boolean No
pricing_tables[].sections[].title String Yes
pricing_tables[].sections[].rows[] Array No
pricing_tables[].sections[].rows[].data Object No
pricing_tables[].sections[].rows[].options Object No
pricing_tables[].sections[].rows[].options.optional_selected Boolean No
pricing_tables[].sections[].rows[].options.qty_editable Boolean No
pricing_tables[].sections[].rows[].options.optional Boolean No
pricing_tables[].sections[].rows[].custom_fields Object No
pricing_tables[].options Object No
pricing_tables[].data_merge Boolean No

When set to true all field names in data rows must be passed as external names defined in the template.

images[] Array No

You can pass a list of images to image blocks (one image in one block) for replacement.

images[].name String Yes
images[].urls[] Array Yes
tags[] Array No

Mark your document with one or several tags.

metadata Object No

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.

texts[] Array No

You can pass a list of texts to text blocks for replacement.

texts[].data String Yes

The rich text content to be inserted into the block. Supports markdown.

texts[].name String Yes

The name of the text block to update.

fields Object No

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"}
fields.name Object No
fields.name.value Yes

The value to pre-fill the field with. The type of the value depends on the field type in the template. For example, for a checkbox field, you can pass a boolean value, and for a date field, you can pass a date string in RFC 3339 format (e.g., 2019-12-31T00:00:00.000Z).

tables[] Array No
tables[].data Object Yes
tables[].data.sections[] Array Yes
tables[].data.sections[].header[] Array Yes
tables[].data.sections[].header[].text String Yes

Cell text.

tables[].data.sections[].header[].col_span Integer No

Represents how many columns the cell occupies.

tables[].data.sections[].header[].row_span Integer No

Represents the number of rows the cell occupies.

tables[].data.sections[].rows[] Array Yes
tables[].name String Yes

Name of the table.

tokens[] Array No

Create or initialize multiple variables with their values using tokens/values list.

tokens[].name String Yes
tokens[].value String Yes

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.