Create Document

Create from a template

See the Create document from template tutorial for details on how to use this endpoint, as well as a sample template.

Create from a URL

See the Create from public PDF guide for info about roles and fields, as well as PDF examples.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
deprecated

Set this parameter as ev1 if you want to create a document from PDF with Classic Editor when both editors are enabled for the workspace.

string

Set this parameter as yes or 1 or true (only when upload pdf with form fields) if you want to respect form fields properties, like required.

Body Params

Use a PandaDoc template to create a document.

string
required

The ID of a template you want to use. You can copy it from an in app template url such as https://app.pandadoc.com/a/#/templates/{ID}/content. A template ID is also obtained by listing templates.

fields
object

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"}
images
array of objects or null

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

images
pricing_tables
array of objects

Information to construct or populate a pricing table can be passed when creating a document. All product information must be passed when creating a new document. Products stored in PandaDoc cannot be used to populate table rows at this time. Keep in mind that this is an array, so multiple table objects can be passed to a document. Make sure that "Automatically add products to this table" is enabled in the PandaDoc template pricing tables you wish to populate via API.

pricing_tables
tables
array of objects

Information to construct or populate a table can be passed when creating a document. Keep in mind that this is an array, so multiple table objects can be passed to a document.

tables
texts
array of objects

You can pass a list of rich text values to pre-fill text blocks in a template. This is useful for inserting dynamic content like introductions or terms and conditions. Markdown is supported.

texts
boolean

Set this parameter as true if you want to detect title variables in the document.

content_placeholders
array of objects

You may replace Content Library Item Placeholders with a few content library items each and pre-fill fields/variables values, pricing table items, and assign recipients to roles from there.

content_placeholders
string

Name the document you are creating.

string

ID of the folder where the created document should be stored.

owner
object

The owner of the document. Pass either email or membership_id of the user in the workspace.

recipients
array of objects
required

The list of recipients to whom the document will be sent. Either email or phone is required. Specifying the role assigns all matching fields to the recipient or group. If first_name and last_name are not specified, the system looks them up in the workspace contacts list using the email or phone number. If first_name and last_name are provided, they override the existing contact's data.

recipients*
tokens
array of objects

Also known as variables. Pass values for the variables in the template to render them into the created document or make them available for insertion later.

tokens
metadata
object | null

You can pass any data in a key-value format to associate it with a document. Searching by metadata is available in the List Documents endpoint and is also included in the Document Details response.

tags
array of strings

Mark your document with one or more tags. Tags are displayed in the UI, and you can filter by tags in the List Documents endpoint.

tags
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json