Quickstart

Here's how to get started creating documents with DocuPotion:

  1. Grab your API Key
  2. Create a reusable template
  3. Generate a PDF via the DocuPotion API

Grab your API Key

Estimated time: 1 minute

Create your API key on the Integrations tab of your DocuPotion dashboard:

  1. Open Integrations in your DocuPotion dashboard.
  2. Click Create API key.
  3. Copy the key from the window that appears and store it somewhere safe. For your security, the full key is only shown once.

Lost your key? Click Create new API key on the same page. Your old key stops working immediately, so update it everywhere you use it.


Treat the key like a password

The API key authenticates every request you make to DocuPotion. Don't ship it in frontend code or commit it to version control. Keep it in your backend environment variables.


Create a reusable template

Navigate to the Templates section of your DocuPotion dashboard and click on the New Template button. You'll have 3 options for creating a new template:

Google Docs: Connect to your Google Drive and pick an existing Doc template or start from scratch. See this doc for full instructions.

Upload a PDF: Choose this option if you have an existing PDF and you want to add overlay fields that you can merge your data to. Fillable PDFs with form fields also accepted. See this doc for full instructions.

AI Builder: Create a template based on a prompt or choose one of our HTML library templates. You can also attach existing PDF or HTML files for reference. See this doc for full instructions.


Once you've picked an option, you'll be brought to the DocuPotion template editor.

Generate a PDF via the DocuPotion API

Estimated time: 1-5 minutes

There's one endpoint you need:

POST https://api.docupotion.com/v1/create     

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY      


Request body

Field Description
templateId Required. The Template ID, shown next to the template name in the template editor.
data Object of merge-field values. Keys must match your template's merge fields exactly (listed under Merge Fields in the template editor).
output "base64"       (default) returns the file bytes encoded inline, or "url"       returns a presigned download URL.
expiration Only valid with output: "url"      . Minutes the URL stays live — 1       to 10080       (7 days). Defaults to 60      .
s3_bucket, s3_key Optional. Route the generated file to your own S3 bucket instead of DocuPotion-managed storage. See Bring Your Own Storage.

Example request

curl -X POST https://api.docupotion.com/v1/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "i22b48vzap902r5",
    "output": "url",
    "expiration": 60,
    "data": {
      "company_name": "Acme Studios",
      "invoice_number": "INV-0421",
      "date_issued": "2026-04-22",
      "date_due": "2026-05-22",
      "client_name": "Globex Corporation",
      "total": "$4,250.00"
    }
  }'

Response

When output: "url"      :

{
  "url": "https://...amazonaws.com/...signed-url..."
}

When output: "base64"      :

{
  "base64": "JVBERi0xLjQKJe...",
  "fileName": "document.pdf"
}

Pick the right output type

Use url when you want to share or stream the file (emails, webhooks, client downloads). Use base64 when your backend needs the bytes directly (e.g. to attach to an outbound email or save to your own storage)


You're done

A few places to go next:

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.