PDF Generation API

Generate custom PDFs from JSON in seconds. Design your templates visually, then call a single REST endpoint to produce documents at scale.

Try it out, no sign up required

Invoice
Invoice
Shipping Label
Shipping Label
Certificate
Certificate
Purchase Order
Purchase Order
Blank Template
Blank Template
Create customFree signup required

Generate a PDF in any language

A single POST request to /v1/create turns your template and JSON data into a finished PDF. Copy a sample below and you're generating documents in minutes.

curl -X POST https://api.docupotion.com/v1/create \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "your_template_id",
    "output": "url",
    "format": "pdf",
    "data": {
      "name": "John Doe",
      "invoice_number": "INV-001",
      "items": [
        { "description": "Product A", "quantity": 2, "price": 50.00 },
        { "description": "Product B", "quantity": 1, "price": 75.00 }
      ],
      "total": 175.00
    }
  }'

Need more detail? See the full API reference.

An API built for developers

DocuPotion provides a simple REST API that makes it quick and easy to get your PDF generation up and running. Just make a POST request with your JSON data, and get back a perfectly formatted PDF.

The way APIs should work.

PDF Generation API
How the PDF Generation API works

Click a step to see what it looks like in code.

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Full request and response reference in the API docs.

Frequently asked questions

How does the DocuPotion PDF generation API work?

You design a PDF template once in the DocuPotion editor, then call a single REST endpoint — POST /v1/create — passing your template ID and a JSON object containing the data you want merged in. DocuPotion renders the document on the fly and returns a hosted URL or a base64-encoded file in seconds. There's no SDK to install, no server to maintain, and no headless browser to manage — it's a single HTTPS request from any language.

What languages and frameworks does the API support?

Any language that can make an HTTPS request. Because the DocuPotion API is a standard REST endpoint that accepts JSON and returns JSON, you can call it from Node.js, Python, PHP, Ruby, Go, Java, .NET, Rust, or directly from your shell with cURL — no client SDK required. We provide ready-to-copy code samples in cURL, Node.js, Python, PHP and Ruby above, and you can also trigger document generation from no-code platforms like Bubble.io, Airtable and n8n through our native integrations.

Is there a free PDF generation API I can try?

Yes. You can try the DocuPotion PDF generation API with a free trial — no credit card required — which gives you full access to the template editor, the API and our integrations so you can build and test a real document workflow before committing. You can also try the API live in your browser using the playground at the top of this page, with no signup at all.

How fast is the PDF generation API?

Most single-document requests complete in a couple of seconds end-to-end, including template rendering and PDF generation. For high-volume workloads, the API is designed to be called in parallel — you can fire off many requests concurrently rather than queuing them sequentially — which lets teams generate thousands of documents per hour from the same account.

Ready to get started?

Start generating PDFs at scale with our simple API.

Start Free Trial