Endpoint
Authentication
Include your API key in the request headers:Request Body
You must provide eitherhtmlContent OR templateId, but not both.
Using Raw HTML
Using a Template
Parameters
Required (one of)
string
Raw HTML content to convert to PDF. Supports Handlebars syntax for dynamic content.
string
ID of a saved template to use. Find this in the template editor or templates list.
Optional
object
JSON object with data to inject into Handlebars placeholders.
string
Custom filename for the generated PDF (without .pdf extension). Max 255 characters.
object
PDF generation options. When using a template, these override template settings.
Options Object
string
default:"A4"
Paper size. One of:
A0, A1, A2, A3, A4, A5, A6, Letter, Legal, Tabloid, Ledger, Customstring
default:"portrait"
Page orientation. One of:
portrait, landscapenumber
Custom page width in millimeters. Only used when format is
Custom.number
Custom page height in millimeters. Only used when format is
Custom.object
Page margins in millimeters.
boolean
default:"true"
Include background colors and images in the PDF.
object
Page header configuration.
Page footer configuration.
string
Dynamic filename template using Handlebars syntax. Example:
Invoice-{{invoiceNumber}}
