Documents

Create Document from File Upload

Changed on

Create from an upload

See the Create from PDF 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.

post/public/v1/documents?upload

Request

Query parameters

editor_verstring

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.

use_form_field_propertiesstring

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.

Request body multipart/form-data

filestring binary

Binary PDF File

Example request

{
  "data": {
    "editable": true,
    "fields": {
      "Like": {
        "value": true
      },
      "Delivery": {
        "value": "Same Day Delivery"
      },
      "Date": {
        "value": "2019-12-31T00:00:00.000Z"
      }
    },
    "name": "API Sample Document from PandaDoc Template",
    "folder_uuid": "QMDSzwabfFzTgjW4kUijqQ",
    "owner": {
      "membership_id": "QMDSzwabfFzTgjW6KijHyu"
    },
    "recipients": [
      {
        "role": "user",
        "signing_order": 1,
        "email": "josh@example.com",
        "phone": "+14842634627",
        "first_name": "Josh",
        "last_name": "Ron",
        "redirect": {
          "url": "https://example.com"
        },
        "type": "recipient",
        "verification_settings": {
          "verification_place": "before_open",
          "email_otp_verification": {
            "email": "user@example.com"
          }
        }
      }
    ],
    "tokens": [
      {
        "name": "Client.CompanyName",
        "value": "PandaDoc"
      }
    ],
    "metadata": {
      "lead_id": "1234567",
      "lead_source": "PandaDoc"
    },
    "tags": [
      "created_via_api",
      "test_document",
      "created_from_source"
    ]
  }
}

Response

OK

idstring
namestring
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_createdstring
date_modifiedstring
expiration_datestring nullable
versionstring nullable
uuidstring
info_messagestring

Example response

{
  "id": "cKbJ7uay3cEGtsKuGPwYGX",
  "name": "API Sample Document from PandaDoc Template",
  "status": "document.draft",
  "date_created": "2021-10-08T11:06:32.337395Z",
  "date_modified": "2021-10-08T11:06:32.337395Z",
  "expiration_date": "2021-10-08T11:06:32.337395Z",
  "version": "EV2",
  "uuid": "cKbJ7uay3cEGtsKuGPwYGX",
  "links": [
    {
      "rel": "status",
      "href": "https://api.pandadoc.com/public/v1/documents/jzjCfYgKQYm2u9ctwN6io4",
      "type": "GET"
    }
  ],
  "info_message": "You need to poll the Document Status method until the status will be changed to document.draft"
}

Changes