PandaDoc
documents_create
# Create document Create a new PandaDoc document. Pass a single `request` object and set its `source` to choose how the document is created: - `source: "template"` — from an existing template. Required: `template_uuid`. Also accepts `name`, `recipients`, `fields`, `tokens`, `metadata`, `tags`, `images`, `pricing_tables`, `tables`, `texts`, `folder_uuid`, `owner`, `detect_title_variables`, `content_placeholders`. - `source: "markdown"` — from markdown content. Required: `name`, `document_markdown`. Also accepts `recipients` (individual recipients only; groups are not supported), `role_fields`, `folder_uuid`. - `source: "file"` — from a downloadable PDF or DOCX file URL. Required: `name`, `url`. Also accepts `recipients`, `parse_form_fields`, `fields`, `tokens`, `metadata`, `tags`, `folder_uuid`, `owner`. The schema is polymorphic on `source`: each source accepts **only** its own parameters. Passing a parameter that belongs to another source is rejected by validation, so you never need to guess which fields are ignored. ## Template Create a document populated from an existing PandaDoc template. Optionally set fields, tokens, pricing tables, recipients, and other template data. ## File Create a document from a PDF or DOCX file referenced by `url`. The URL must be directly downloadable (no auth, no HTML interstitials) — presigned S3/GCS/Azure URLs or direct CDN links work best; Google Drive and Dropbox share links do not (they return HTML, not the file). Creation is asynchronous: the document starts in Uploaded status and transitions to Draft after some time (or to Error if the file is invalid). Poll `documents_status_get` until Draft, then edit or send. To parse fillable PDF form fields, set `parse_form_fields: true` and provide `fields` mapping **every** form field name to a recipient role — omitting any causes failure. ## Markdown Create a new document in PandaDoc from markdown when there is only text representing the document content. Document content must be generated according to the guidelines below. The response includes a `document_url` field with a direct URL to open the created document in PandaDoc. Document creation is asynchronous. After this tool returns, the document starts in Uploaded status and transitions to Draft after some time (or to Error if creation fails). The document must be in Draft status before it can be edited or sent. ### Markdown guidelines You can use standard CommonMark and GitHub-Flavored Markdown (tables, strikethrough, etc), plus the following custom extensions: #### Custom Syntax Extensions ##### 1. Variables Variables are placeholder values that the document creator fills in PandaDoc before sending to recipients. Prioritize variables over fields for any value that the sender controls or pre-fills, even if it may be visible to recipients. **Syntax:** `[VariableName]` or `[Variable.Name]` or `[Multi.Part.Variable]` - Can include underscores, numbers, and multiple dot-separated parts **Use variables for values controlled by the document creator:** - Document metadata: `[Effective.Date]`, `[Agreement.Number]`, `[Contract.Value]` - Company/sender information: `[Company.Name]`, `[Company.Address]` - Pre-calculated values: `[Invoice.Total]`, `[Discount.Amount]` - Recipient information already known: `[Recipient.CompanyName]`, `[Recipient.FirstName]` **Key principle:** If the sender controls the value, use a variable. ##### 2. Fields Fields are interactive form elements that recipients fill in or interact with during the signing process. Recipients see these as input boxes, checkboxes, or signature areas. **Use fields for values controlled by the recipient:** - Recipient signatures: `[[signature]]` - Recipient personal data they must enter: `[[text]]`, `[[email]]`, `[[phone]]`, `[[date]]` - Recipient choices/consents: `[[checkbox]]` - Information only the recipient knows or decides **Key principle:** If the recipient controls the value, use a field. Fields can be prefilled with default values, but are typically left empty for the recipient to fill. **Syntax:** `[[field_type attributes]]` **Field Types:** - `text` - Text input field - `email` - Email input field - `phone` - Phone number input field (**`format` is required** — see below) - `number` - Number input field - `date` - Date input field - `checkbox` - Checkbox field - `signature` - Digital signature field - `dropdown` - Dropdown selection field (**`option` is required** — see below) **Attributes (HTML-style):** - `required="true"` - Makes field required - `placeholder="text"` - Placeholder text - `checked="true"` - Pre-checked (checkbox only) - `value="timestamp"` - For date fields, use UNIX timestamp with millisecond precision (e.g., value="1718406000000"). For other fields, use plain text (e.g., value="John Doe"). - `format="US"` or `format="international"` - **Required for `phone` fields.** Must be exactly `"US"` or `"international"`. There is no default — omitting it causes a validation error. - `date_format="yyyy/MM/dd"` - Date format in ICU notation (e.g., `"dd/MM/yyyy"`, `"MM-dd-yyyy"`). Defaults to `"yyyy/MM/dd"` if omitted. - `option="Text"` - **Required for `dropdown` fields.** Repeatable — add one per option (e.g., `option="Yes" option="No"`). To assign a stable UUID to an option, use `option="uuid:Text"` format. - `id="Client_Text1"` - Specify an external ID that describes who should fill this field and what it represents (e.g., `id="Client_Signature"`, `id="Landlord_FullName"`, `id="Buyer_Email"`). Use the pattern `<RecipientRole>_<FieldPurpose>` so the field can later be assigned to the correct recipient. Multiple fields MAY share the same ID (they'll be synced — when one is filled, all are filled with the same value), but they MUST have the same type and attributes. **Examples:** - `[[text placeholder="Enter name"]]` - `[[email required="true" placeholder="Email address"]]` - `[[phone format="US"]]` - `[[phone format="international"]]` - `[[number]]` - `[[date required="true" value="1718406000000"]]` - `[[date date_format="dd/MM/yyyy"]]` - `[[checkbox checked="true"]]` - `[[dropdown option="Yes" option="No"]]` - `[[dropdown option="Yes" option="No" value="Yes" placeholder="Choose..."]]` **Important:** Fields with the same ID must have the same type and attributes. For example, you cannot have `[[text id="Field1"]]` and `[[email id="Field1"]]` in the same document as well as `[[text id="Field2" placeholder="Full Legal Name" ]]` and `[[text id="Field2"]]` because they have different attributes. **Dropdown constraints:** - At least one `option` attribute is required. - Option texts must be unique within the dropdown. - If `value` is set, it must match one of the defined option texts exactly; otherwise a validation error occurs. ##### 3. Standalone Checkboxes Checkboxes use GFM syntax but can appear anywhere, not just in lists: - `[ ]` - Unchecked - `[x]` - Checked - Can be used inline, standalone, or in task lists ##### 4. Page Breaks **Syntax:** `---` (three hyphens) creates a page break. **IMPORTANT:** Page breaks should be rare and intentional. Most documents don't need page breaks. Only use `---` when content **must** be on separate pages for a specific reason: - Legal/structural requirement - Document structure demands it **Do NOT use `---`:** - Between sections (use headings: `## Section Title`) - As visual decoration (use blank lines) - Simply because there's a section transition ### Limitations (Features NOT Supported) **Do NOT include:** - Blockquotes inside lists - Images inside links inline with text (e.g., `[](link)`)
Remote (network-hosted)
Other tools also called documents_create?
See providers with this name
Input Schema
{
"type": "object",
"properties": {
"request": {
"oneOf": [
{
"type": "object",
"required": [
"template_uuid"
],
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Document name. Defaults to the template title when omitted."
},
"tags": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document tags."
},
"owner": {
"anyOf": [
{
"type": "object",
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"membership_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document owner (email or membership_id)."
},
"texts": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"data"
],
"properties": {
"data": {
"type": "string"
},
"name": {
"type": "string"
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Text blocks to populate by name."
},
"fields": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"value"
],
"properties": {
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
}
]
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document fields as key-value pairs."
},
"images": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"urls"
],
"properties": {
"name": {
"type": "string"
},
"urls": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Images to populate in template image blocks."
},
"source": {
"type": "string",
"const": "template",
"default": "template"
},
"tables": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"data"
],
"properties": {
"data": {
"type": "object",
"required": [
"sections"
],
"properties": {
"sections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"rows": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string"
},
"col_span": {
"type": "integer",
"default": 1,
"minimum": 0
},
"row_span": {
"type": "integer",
"default": 1,
"minimum": 0
}
}
}
}
},
"header": {
"type": "array",
"items": {
"type": "object",
"required": [
"text"
],
"properties": {
"text": {
"type": "string"
},
"col_span": {
"type": "integer",
"default": 1,
"minimum": 0
},
"row_span": {
"type": "integer",
"default": 1,
"minimum": 0
}
}
}
}
}
},
"minItems": 1
}
}
},
"name": {
"type": "string"
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Tables to populate by name."
},
"tokens": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document tokens (variables) as name/value pairs."
},
"metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Document metadata as key-value pairs."
},
"recipients": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"redirect": {
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"is_enabled": {
"type": "boolean",
"default": false
}
}
},
{
"type": "null"
}
],
"default": null
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"signing_order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"delivery_methods": {
"anyOf": [
{
"type": "object",
"properties": {
"sms": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "null"
}
],
"default": null
},
"verification_settings": {
"anyOf": [
{
"type": "object",
"properties": {},
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "object",
"required": [
"name",
"members"
],
"properties": {
"name": {
"type": "string"
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"type": "string",
"const": "recipient_group",
"default": "recipient_group"
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
}
}
}
},
"signing_order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
}
}
}
]
}
},
{
"type": "null"
}
],
"default": null,
"description": "Recipients. Omit to use template defaults or to create without recipients."
},
"folder_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Destination folder UUID."
},
"template_uuid": {
"type": "string",
"description": "Template UUID to create the document from."
},
"pricing_tables": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"sections"
],
"properties": {
"name": {
"type": "string"
},
"options": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Table-level settings: currency, discount, tax_first, tax_second. Discount: {name, type: 'absolute'|'percent', value}. Tax: {name, type: 'percent', value}."
},
"sections": {
"type": "array",
"items": {
"type": "object",
"required": [
"title"
],
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"description": "Row data keyed by column name (e.g. name, price, qty, description). Tax/discount columns use {value, type: 'percent'}.",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"optional": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"qty_editable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"optional_selected": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"multichoice_selected": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
"custom_fields": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
}
}
}
},
"title": {
"type": "string"
},
"default": {
"type": "boolean",
"default": true
},
"multichoice_enabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
"minItems": 1
},
"data_merge": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Pricing tables to populate by name."
},
"content_placeholders": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"block_id",
"content_library_items"
],
"properties": {
"block_id": {
"type": "string"
},
"content_library_items": {
"type": "array",
"items": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
},
"fields": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
},
"recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"redirect": {
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"is_enabled": {
"type": "boolean",
"default": false
}
}
},
{
"type": "null"
}
],
"default": null
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"signing_order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"delivery_methods": {
"anyOf": [
{
"type": "object",
"properties": {
"sms": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "null"
}
],
"default": null
},
"verification_settings": {
"anyOf": [
{
"type": "object",
"properties": {},
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
}
}
}
},
"pricing_tables": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"sections"
],
"properties": {
"name": {
"type": "string"
},
"options": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Table-level settings: currency, discount, tax_first, tax_second. Discount: {name, type: 'absolute'|'percent', value}. Tax: {name, type: 'percent', value}."
},
"sections": {
"type": "array",
"items": {
"type": "object",
"required": [
"title"
],
"properties": {
"rows": {
"type": "array",
"items": {
"type": "object",
"required": [
"data"
],
"properties": {
"data": {
"type": "object",
"description": "Row data keyed by column name (e.g. name, price, qty, description). Tax/discount columns use {value, type: 'percent'}.",
"additionalProperties": true
},
"options": {
"type": "object",
"properties": {
"optional": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"qty_editable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"optional_selected": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"multichoice_selected": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
"custom_fields": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
}
}
}
},
"title": {
"type": "string"
},
"default": {
"type": "boolean",
"default": true
},
"multichoice_enabled": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
"minItems": 1
},
"data_merge": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
}
}
},
"additionalProperties": true
}
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Content placeholders for content library blocks."
},
"detect_title_variables": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Use title variables from the template in the document name."
}
},
"description": "Create a document from an existing PandaDoc template.\n\n``extra=\"forbid\"`` makes the per-source schema authoritative: markdown-only\nparameters (e.g. ``document_markdown``) are rejected by validation rather\nthan silently ignored, so no cross-parameter runtime checks are needed.",
"additionalProperties": false
},
{
"type": "object",
"required": [
"name",
"document_markdown"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"source": {
"type": "string",
"const": "markdown",
"default": "markdown"
},
"recipients": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"redirect": {
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"is_enabled": {
"type": "boolean",
"default": false
}
}
},
{
"type": "null"
}
],
"default": null
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"signing_order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"delivery_methods": {
"anyOf": [
{
"type": "object",
"properties": {
"sms": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "null"
}
],
"default": null
},
"verification_settings": {
"anyOf": [
{
"type": "object",
"properties": {},
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Individual recipients. Recipient groups are not supported for markdown documents."
},
"folder_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Destination folder UUID."
},
"role_fields": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"role",
"field_ids"
],
"properties": {
"role": {
"type": "string"
},
"field_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Role-to-field mapping for markdown document creation."
}
},
{
"type": "null"
}
],
"default": null,
"description": "Role-to-field mappings. Every role must match a recipient role when recipients are provided, and role names must be unique."
},
"document_markdown": {
"type": "string",
"description": "Markdown content. See the tool description for the supported syntax and custom extensions."
}
},
"description": "Create a document from markdown content.\n\n``extra=\"forbid\"`` makes the per-source schema authoritative: template-only\nparameters (e.g. ``template_uuid``, ``fields``) are rejected by validation\nrather than silently ignored.",
"additionalProperties": false
},
{
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"url": {
"type": "string",
"description": "Publicly accessible URL to a PDF or DOCX file. Must return the raw file on HTTP GET without auth (presigned S3/GCS/Azure URLs or direct CDN links work). Google Drive and Dropbox share links do not work — they return HTML, not the file."
},
"name": {
"type": "string",
"description": "Name for the new document."
},
"tags": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document tags."
},
"owner": {
"anyOf": [
{
"type": "object",
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"membership_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document owner (email or membership_id)."
},
"fields": {
"anyOf": [
{
"type": "object",
"additionalProperties": {
"type": "object",
"required": [
"value"
],
"properties": {
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"value": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "boolean"
}
]
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Field name to value+role mapping. Each value needs `role` (recipient role name) and `value` (string, or false for checkboxes). Required with `parse_form_fields` — must include ALL fields from the PDF."
},
"source": {
"type": "string",
"const": "file",
"default": "file"
},
"tokens": {
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document tokens (variables) as name/value pairs."
},
"metadata": {
"anyOf": [
{
"type": "object",
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null,
"description": "Document metadata as key-value pairs."
},
"recipients": {
"anyOf": [
{
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {
"id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"redirect": {
"anyOf": [
{
"type": "object",
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"is_enabled": {
"type": "boolean",
"default": false
}
}
},
{
"type": "null"
}
],
"default": null
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"signing_order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
},
"delivery_methods": {
"anyOf": [
{
"type": "object",
"properties": {
"sms": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
},
"email": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "null"
}
],
"default": null
},
"verification_settings": {
"anyOf": [
{
"type": "object",
"properties": {},
"additionalProperties": true
},
{
"type": "null"
}
],
"default": null
}
}
},
{
"type": "object",
"required": [
"name",
"members"
],
"properties": {
"name": {
"type": "string"
},
"role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"type": {
"type": "string",
"const": "recipient_group",
"default": "recipient_group"
},
"members": {
"type": "array",
"items": {
"type": "object",
"properties": {
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"phone": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"last_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
},
"first_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null
}
}
}
},
"signing_order": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null
}
}
}
]
}
},
{
"type": "null"
}
],
"default": null,
"description": "Document recipients."
},
"folder_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Destination folder UUID."
},
"parse_form_fields": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Parse fillable PDF form fields. Requires `fields` mapping EVERY form field name to a recipient role — omitting any causes failure. Ask the user for the complete list of field names before enabling this."
}
},
"description": "Create a document from a downloadable PDF or DOCX file URL.\n\n``extra=\"forbid\"`` makes the per-source schema authoritative: template- and\nmarkdown-only parameters are rejected by validation rather than silently\nignored.",
"additionalProperties": false
}
],
"description": "Document to create. Set `source` to `template` (create from a PandaDoc template), `markdown` (create from markdown content), or `file` (create from a PDF/DOCX file URL). Each source accepts only its own parameters."
}
}
}