---
title: "Create Document from File Upload"
method: POST
path: "/public/v1/documents?upload"
tags: ["Documents"]
---

# Create Document from File Upload

`POST /public/v1/documents?upload`

## Request

- Base URL: `https://api.pandadoc.com`
- URL: `https://api.pandadoc.com/public/v1/documents?upload`
- Auth: one of:
  - API key in header `Authorization`
  - OAuth 2
    - Authorization code: `https://app.pandadoc.com/oauth2/authorize`
    - Token URL: `https://api.pandadoc.com/oauth2/access_token`
- TypeScript: <https://skmtc.dev/pandadoc/apis/pandadoc-public-api/docs/public/v1/documents%3Fupload/post.ts> (a function with typed inputs; its response is checked against the schema)

## Create from an upload
> See the [Create from PDF](https://developers.pandadoc.com/docs/create-document-from-file) tutorial for the usage specifics and sample PDF files.

**Note**: A file you upload is not stored in your PandaDoc account, so you have to upload it with every request.

## Query parameters

- `editor_ver` string
- `use_form_field_properties` string

## Request body `multipart/form-data`

- object
  - `file` string, binary: Binary PDF File
  - `data` DocumentCreateByPdfRequest
    - `editable` boolean: Only applicable when creating a document from a DOCX file. When `true`, the DOCX is converted into editable content, so the resulting document can be edited. Cannot be combined with `parse_form_fields` or `fields`, which place fields by coordinates on PDF pages.
    - `parse_form_fields` boolean: Set this parameter as `true` if you create a document from a PDF with form fields and as `false` if you upload a PDF with field tags.
    - `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"}`
    - `name` string, required: Name the document you are creating.
    - `folder_uuid` 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.
      - `email` string
      - `membership_id` string
    - `recipients` CreateDocumentActor[]: 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.
      - union
        - CreateDocumentRecipient
          - `role` string, nullable: A recipient's role in the document from the template. A recipient will be added in CC if a role parameter is not provided.
          - `signing_order` integer, nullable: Set a signing order for a recipient. Learn more: https://developers.pandadoc.com/docs/set-signing-order
          - `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.
          - `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'
          - `verification_settings` RecipientVerificationSettings: To set up recipient verification, provide verification_place (required) and exactly one verification type: passcode_verification, phone_verification, kba_verification, id_verification, or email_otp_verification. All other verification type fields must be null. Providing more than one verification type returns a 400 error. - For passcode_verification, provide the passcode. - For phone_verification, provide the phone_number. - For email_otp_verification, provide the email. - For kba_verification and id_verification, set the enabled parameter to true.
            - `verification_place` 'before_open' | 'before_sign': Specifies when a recipient must complete the verification process: - `before_open` (before opening the document), - `before_sign` (before signing the document).
            - `passcode_verification` object, nullable: Sets the passcode.
              - …
            - `phone_verification` object, nullable: Sets the phone number to send a passcode to.
              - …
            - `kba_verification` object, nullable: Sets the KBA verification.
              - …
            - `id_verification` object, nullable: Sets the ID verification.
              - …
            - `email_otp_verification` object, nullable: Sets the email address to send a one-time passcode to.
              - …
        - CreateDocumentRecipientGroup
          - `role` string, nullable: A recipient's role in the document from the template. A recipient will be added in CC if a role parameter is not provided.
          - `signing_order` integer, nullable: Set a signing order for a recipient. Learn more: https://developers.pandadoc.com/docs/set-signing-order
          - `name` string, required
          - `type` 'recipient_group', required
          - `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.
    - `tokens` object[]: 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.
      - `name` string, required
      - `value` string, required
    - `metadata` object, nullable: 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` string[]: 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.

## Response `201`

OK

- DocumentCreateResponse
  - `id` string
  - `name` string
  - `status` 'document.draft' | 'document.sent' | 'document.completed' | 'document.uploaded' | 'document.error' | 'document.viewed' | 'document.waiting_approval' | 'document.approved' | 'document.rejected' | 'document.waiting_pay' | 'document.paid' | 'document.voided' | 'document.declined' | 'document.external_review' | 'document.scheduled'
  - `date_created` string
  - `date_modified` string
  - `expiration_date` string, nullable
  - `version` string, nullable
  - `uuid` string
  - `links` object[]
    - `rel` string
    - `href` string
    - `type` string
  - `info_message` string

## Other responses

- `400`: Bad Request
- `401`: Authentication error
- `429`: Too Many Requests

## Changes

- **2026-11-03** `b9a306b1a421`: 1 info
  - added the new optional request property `data/editable`

[Operation history](https://skmtc.dev/pandadoc/apis/pandadoc-public-api/changes/public/v1/documents%3Fupload/post.md)

---

[API](https://skmtc.dev/pandadoc/apis/pandadoc-public-api.md) - [All operations](https://skmtc.dev/pandadoc/apis/pandadoc-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pandadoc/apis/pandadoc-public-api/revisions/b9a306b1a421?raw)
