How to Create a Document from a Public URL

Create a PandaDoc document by providing a publicly accessible PDF URL instead of uploading a local file.

Problem

You have a PDF hosted at a public URL (e.g., on S3, a CDN, or another web server) and you want to create a PandaDoc document from it via the API without uploading a local file.

Prerequisites

  • A PandaDoc API key or OAuth token
  • A PDF file hosted at a publicly accessible URL

Solution

Step 1: Make the PDF publicly accessible

Host your PDF at a URL that PandaDoc servers can reach. If you're using AWS S3, ensure the bucket policy allows GetObject for public access. The PDF must be fully uploaded and accessible before you send the create request.

Step 2: Prepare interactive fields (optional)

If you want PandaDoc to recognize interactive fields in your PDF, choose one of these approaches:

Sample files for testing:

Step 3: Send the create request

POST /public/v1/documents
{
  "name": "My document",
  "url": "https://example.com/path/to/mydocument.pdf",
  "recipients": [
    {
      "email": "[email protected]"
    }
  ],
  "parse_form_fields": false
}

The response returns the document ID with status document.uploaded:

{
  "id": "XHjv8z3SfDuTseFSnhprML",
  "name": "My document",
  "status": "document.uploaded",
  "date_created": "2021-07-05T15:05:27.787341Z",
  "date_modified": "2021-07-05T15:05:27.787341Z",
  "uuid": "XHjv8z3SfDuTseFSnhprML"
}

Step 4: Wait for draft status

Document creation is asynchronous. Wait for the document to reach document.draft before sending or modifying it. See Understanding Asynchronous Document Creation for polling and webhook strategies.

Verification

  1. Check the document status -- confirm it reaches document.draft.
  2. Open the document in the PandaDoc web app to verify the PDF rendered correctly and any fields were recognized.
  3. Use the Document Details endpoint to inspect the document programmatically.

Related