Quickstart

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

  1. Register for a DocuPotion account
  2. Grab your API Key
  3. Design your PDF in the document editor
  4. Generate a PDF via the DocuPotion API

Register for a DocuPotion account

Estimated time: 1 minute

Head to the DocuPotion homepage and click on the 'Register / Sign in' or 'Start Free Trial' button.

This will bring you to the 'Register' page where you can register for an account. Choose REST API and the onboarding wizard will route you straight into the document to create your first template

Grab your API Key

Estimated time: 1 minute

Your API key is generated automatically when you sign up — no extra step required. To find it:

  1. Open your DocuPotion dashboard.
  2. Go to the API Integration section.
  3. Copy the key and store it somewhere safe.

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.


Design your PDF in the template editor

Estimated time: 1-20 minutes (depends on how complex your PDF document is)

DocuPotion's Document Editor is a prompt-driven template builder: you describe the document you want in plain English and the editor generates the underlying HTML, CSS, and data schema for you. No drag-and-drop, no HTML knowledge required.

Document Editor

1. Describe your document

In the chat pane on the left, type what you're trying to create. Be as specific or as loose as you like — the model is happy with both. Examples:

  • "A simple invoice for my freelance business with line items and payment terms."
  • "A 2-page sales proposal for a SaaS product. Include a summary, three pricing tiers, and a signature block."
  • "A one-page certificate of completion with the student's name, course title, and issue date."

Hit send. The editor will draft the full template — layout, typography, merge fields, and sample data — and render it live in the preview pane on the right.


2. Upload reference images to embed

Above the prompt box, drag in logos, headers, product shots, or any image you want to appear in the document using the Upload Images rail. Each image gets an auto-assigned handle like @img1, @img2. You can attach up to eight images at a time.


Reference a handle in your prompt to tell the editor where to place it — e.g. "Use @img1 as the company logo in the header" or "Add @img2 as a hero image at the top of the first page". The image gets inserted into the template at the spot you describe.

Tip: Uploaded images stay attached across the whole session and reload with the template, so you can iterate without having to re-upload your logo each turn.

3. Iterate by chatting

Keep refining the template with follow-up prompts. The editor remembers the conversation, so you can say things like:

  • "Make the header more compact and move the logo to the right."
  • "Add a discount row below the subtotal."
  • "Change the font to something more playful."

Simple edits are applied surgically and come back in a few seconds. Bigger redesigns take a little longer because the editor regenerates the template from scratch.


4. Set up your merge fields

Anywhere you want dynamic data, the editor will insert a {{mustache}}    variable — e.g. {{company_name}}   , {{invoice_number}}   , {{total}}   . You can see and edit these in the Data tab at the top of the preview.


If you already know what data your n8n workflow will send, include that list in your prompt up front — e.g. "Use these fields: first_name, last_name, email, amount_due, due_date". The editor will bind them exactly and won't invent extras.


5. Preview with real-looking data

Toggle With data above the preview to render the template with the sample values from the Data tab. This is what your final PDF will look like when n8n sends real values in.


6. Publish the template

When you're happy with the draft, click Publish in the top-right. Only published versions are used when n8n generates a PDF, so you can keep tweaking the draft without affecting live workflows.

Heads up: Your n8n workflow references the template by its Template ID (shown next to the template name at the top of the editor). That ID never changes, so you can republish updates without touching your n8n node.



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 from the Vibe Editor.
data Object of merge-field values. Keys must match the variables in your template's Data tab exactly.
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

  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "templateId": "i22b48vzap902r5",
    "output": "url",
    "format": "pdf",
    "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:


Stuck? Email support@docupotion.com.

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