API Reference

Programmatically generate PDFs using our simple REST API. All requests must include your API Key in the `Authorization` header.

Authorization: Bearer <YOUR_API_KEY>

Generate PDF Link

Generates a PDF from a template and returns a temporary download URL.

POST/api/v1/generate

Parameters

template_id
string
Required
ID of the template to use
data
object
Required
JSON object containing variables to inject

Request Body

{
  "template_id": "tpl_123456",
  "data": {
    "customer_name": "Acme Corp",
    "items": [
      {
        "name": "Service A",
        "price": 100
      }
    ]
  }
}

Download PDF Binary

Generates a PDF and returns the file binary directly. Useful for piping to other services.

POST/api/v1/download

Parameters

template_id
string
Required
ID of the template to use
data
object
Required
JSON object containing variables to inject

Request Body

{
  "template_id": "tpl_123456",
  "data": {
    "name": "John Doe"
  }
}

List Templates

Retrieves a list of all templates available in your account.

GET/api/v1/templates

Parameters

limit
number
Optional
Max number of results (default 20)
page
number
Optional
Page number

List Workspaces

Retrieves a list of all workspaces your account has access to.

GET/api/v1/workspaces