Easily authorize your application with an API key. You can generate either a Sandbox or Production key in PandaDoc Settings > Integrations > API. Use the API key as an Authorization header in this format “API-Key {{api_key}}” for all your API requests.

Please note the differences between the Sandbox and the Production API keys:

Sandbox Key

Production Key

Calls are limited to 10 requests per minute, per endpoint.

Calls are limited to 100 requests per minute, per endpoint.

Generated PDFs have watermarks.

No watermarks in the generated PDFs.

Created documents have "[DEV]" prefix by default.

Created documents have the name specified in the request without "[DEV]" prefix.

The API Sandbox is available on the Business, Enterprise and API plans. The production API key is available on the API plan, which can be requested via API request form.

Our updated Postman collection supports both API key and OAuth 2.0 authentication.

For more details, check our API reference.

PandaDoc API allows to Send Document for approval if "Approval Workflow" is turned on in the template used for document creation. Document sent for approval will have "document.waiting_approval" status.

You need to make Send Document call after a document is approved in order to send the document to recipients.

If a document is in "waiting_approval" or "rejected" status, you can't use Share Document call. Share Document endpoint will return HTTP 400 with one of the following error messages:

If document is in "Waiting for Approval" status

{
  "type": "state_error",
  "detail": "Cannot create session ID for a document in document.waiting_approval status"
}

If document is in "Rejected" status

{
  "type": "state_error",
  "detail": "Cannot create session ID for a document in document.rejected status"
}

Tags can now be specified on Create Document from a template, form fields PDF, field tags PDF.

API example:

{  
    "name": "API Sample Document from PandaDoc Template",
    "tags": [
       "tag_1",
       "tag_2"
    ],
    ...
}

Using PandaDoc API (List Documents endpoint) you can list documents, created from a specific template.

Request example:
https://api.pandadoc.com/public/v1/documents?template_id=111222333

Response example:

{
    "results": [
        {
            "id": "XQZvGbfYoCCXSLAEdWPQ6C",
            "name": "Integration test",
            "status": "document.completed",
            "date_created": "2018-08-28T19:28:01.539904Z",
            "date_modified": "2018-08-28T19:28:42.923935Z",
            "expiration_date": "2018-10-27T19:28:28.813375Z"
        }
    ]
}

Document details endpoint and Webhooks now return information about the template that was used for document creation. If a document was created from PDF, it will return null instead of template information.

API example:

{
    "id": "g2wE9fJikvJTPaeyYDe82J",
    ...
    "template": null,
    "expiration_date": "2028-06-16T09:27:01.219415Z",
    "metadata": {},
    "tokens": [],
    ...
}

Webhook example:

[
  {
    "event": "document_state_changed",
    "data": {
      "id": "YcNQSR7kV5CHXivEKpEPY3",
      ...
      },
      ...
      "template": {
        "id": "rpsdeCfuLVNGhA2YJkU4PK",
        "name": "Integration test"
      }
    }
  }
]

Document details endpoint and Webhooks now return document's expiration date.

API example:

{
    "id": "g2wE9fJikvJTPaeyYDe82J",
    ...
    "expiration_date": "2028-06-16T09:27:01.219415Z",
    "metadata": {},
    "tokens": [],
    ...
}

Webhook example:

[
  {
    "event": "document_state_changed",
    "data": {
      "id": "g2wE9fJikvJTPaeyYDe82J",
      "name": "Integration test",
      "date_created": "2018-08-08T11:39:56.871553Z",
      "date_modified": "2018-08-08T11:39:57.180209Z",
      "expiration_date": "2028-06-16T09:27:01.219415Z",
      ...
    }
  }
]

PandaDoc API allows creating documents from PDF.
There is 50 MB limit on file attachment size.

Now API returns a specific error in case of bigger files - HTTP status "413 Request entity too large".

JSON response example:

{
  "type": "request_error",
  "detail": "Attached file is too big. Maximum file size is 50 MB"
}

Document details endpoint and Webhooks now return information about document's Grand Total.

API example:

{
    ...
    "id": "WHT7fGF2QeWSTZEsg6un75",
    "grand_total": {
        "amount": "29.99",
        "currency": "USD"
    },
    ...
}

Webhook example:

{
    "data": {
        ...
        "id": "WHT7fGF2QeWSTZEsg6un75",
        "grand_total": {
        "amount": "29.99",
        "currency": "USD"
        },
        ...
    },
    "event": "document_state_changed"
}

PandaDoc API and Webhooks now return information about document's expiration date.

Please, take a note that the expiration date may be null as this property only makes sense for documents in Sent, Viewed, Waiting for Payment, and Paid statuses.

List of endpoints that return expiration date:

  1. Create document. The expiration date will always be null here as there is no expiration date for documents in Uploaded and Draft.
  2. Document status.
  3. Document details.
  4. Send document.

API example:

{
    "id": "dvEnR6iJ8pVSEssbQoEshT",
    "name": "API Sample Document from PandaDoc Template",
    "status": "document.waiting_approval",
    "date_created": "2018-06-18T12:07:17.721482Z",
    "date_modified": "2018-06-18T12:07:46.108405Z",
    "expiration_date": null,
    "uuid": "dvEnR6iJ8pVSEssbQoEshT"
}

Webhook example:

{
    "data": {
        ...
        "date_created": "2018-06-18T12:06:54.389089Z",
        "date_modified": "2018-06-18T12:31:24.920614Z",
        "expiration_date": "2018-08-17T12:31:24.833779Z",
        ...
    },
    "event": "document_state_changed"
}