---
updatedAt: 2026-10-02T14:12:55.000Z
agentTools:
  projectIndex: https://developers.pandadoc.com/llms.txt
---

# How to Pre-Fill Document Fields

Pre-fill text, date, checkbox, and dropdown fields when creating a document from a template via the PandaDoc API.

## Problem

You need to pre-fill interactive fields (text, date, checkbox, dropdown) with values when creating a document from a template via the API, so recipients see pre-populated data instead of empty fields.

## Prerequisites

* A PandaDoc template with interactive fields assigned to roles
* A PandaDoc API key or OAuth token
* Familiarity with the [Create Document](https://developers.pandadoc.com/reference/create-document) endpoint

> 🚧 You cannot pre-fill Signature fields.

## Solution

### Step 1: Map template merge fields to API field keys

Each field in your template has a **merge field name** that you use as the key in the API request. To find it:

1. Open your template in the PandaDoc web app.
2. Click on a field to open its properties.

<Image alt="Field properties" align="center" width="200px" src="https://files.readme.io/65ad63c-Screenshot_2023-08-18_at_17.26.50.png">
  Field properties
</Image>

3. Scroll down to **Merge Field** and note (or set) a meaningful name:

<Image align="center" width="200px" src="https://files.readme.io/54f8fc2-image.png" />

### Step 2: Include field values in the create request

Add a `fields` object to your create document request body. Each key is the merge field name, and the value depends on the field type:

```json
"fields": {
    "Favorite.Color": {
        "value": "PandaDoc green"
    },
    "Delivery": {
        "value": "Same Day Delivery"
    },
    "Like": {
        "value": true
    },
    "Date": {
        "value": "2019-12-31T00:00:00.000Z"
    }
}
```

### Date field formatting

Pass date values in ISO 8601 format: `"value": "2019-02-21T00:00:00.000Z"`.

The display format is controlled by the [date field settings in your template](https://support.pandadoc.com/hc/en-us/articles/360058222713-Date-field-format-and-options#h_01GY0M5KEQK840XXP621C35T2W), not by the API value. The API value determines which date is selected; the template determines how it appears to recipients.

## Verification

1. After creating the document, confirm it reaches `document.draft` status.
2. Open the document in the PandaDoc web app and verify that fields display the expected pre-filled values.
3. Use the [Document Details](https://developers.pandadoc.com/reference/document-details) endpoint to inspect field values programmatically.

## Related

* [How to Create a Document from a Template](https://developers.pandadoc.com/docs/create-document-from-template) — full template-based creation flow
* [How to Add Field Tags to Documents](https://developers.pandadoc.com/docs/field-tags) — text-based curly brace notation for fields in uploaded files
* [How to Use Native PDF Form Fields](https://developers.pandadoc.com/docs/form-fields) — native PDF form field recognition
* [Choosing between Variables and Fields](https://developers.pandadoc.com/docs/choosing-between-variables-and-fields) — when to use fields vs. tokens/variables
* [Create Document API reference](https://developers.pandadoc.com/reference/create-document) — full endpoint parameters