Generate PDFs, manage documents and templates, and configure webhooks via REST API. Available on Business plan and above.
All API requests require a Bearer token in the Authorization header. Tokens use the q_ prefix and are verified via SHA-256 hash lookup.
Generate API tokens in your Dashboard → Settings → API Tokens. API access requires a Business or Enterprise subscription.
Generate PDFs from templates with variable replacement, raw HTML or Markdown. All endpoints accept page settings (margins, font family, columns, headers, footers) and support returnBlob: true for binary response.
/api/v1/generate/templateGenerate a PDF from a template with variable replacement. Supports caching, print-ready output (CMYK, trim marks) and debug mode.
/api/v1/generate/htmlGenerate a PDF from raw HTML. Accepts page settings for margins, font family, columns, headers and footers.
/api/v1/generate/markdownGenerate a PDF from Markdown. Converted to HTML internally, then rendered with the same engine.
/api/v1/generate/batchGenerate multiple PDFs from one template. Each row provides its own set of variables. Returns per-row success/failure status.
| Parameter | Type | Description |
|---|---|---|
templateIdrequired | string | ID of the template to use |
rowsrequired | array | Array of variable objects. Each entry generates one PDF with its own variables. Business: max 100 rows. Enterprise: max 1,000 |
concurrency | number | Parallel generation limit (default 5, max 20) |
Create, list, read and delete documents and templates. All list endpoints support pagination and language filtering.
/api/v1/documentsList all documents in your organization. Supports pagination and language filtering.
/api/v1/documentsCreate a new document.
| Parameter | Type | Description |
|---|---|---|
titlerequired | string | Document title |
language | string | Language code (defaults to organization default) |
/api/v1/documents/:idGet a single document by ID.
/api/v1/documents/:idDelete a document.
/api/v1/documents/:id/duplicateDuplicate a document with optional title and language override.
| Parameter | Type | Description |
|---|---|---|
title | string | Title for the duplicate |
language | string | Language for the duplicate |
/api/v1/templatesList all templates in your organization. Supports pagination and language filtering.
/api/v1/templatesCreate a new template.
| Parameter | Type | Description |
|---|---|---|
namerequired | string | Template name |
language | string | Language code |
/api/v1/templates/:idGet a single template by ID.
/api/v1/templates/:idDelete a template.
/api/v1/templates/:id/duplicateDuplicate a template with optional name and language override.
| Parameter | Type | Description |
|---|---|---|
name | string | Name for the duplicate |
language | string | Language for the duplicate |
Get notified when events happen. Register a URL and select which events to subscribe to. Every payload is HMAC-SHA256 signed so you can verify authenticity.
/api/v1/webhooksList all webhooks in your organization.
/api/v1/webhooksCreate a new webhook. Returns the signing secret once. Payloads include X-Quaterio-Signature (HMAC-SHA256) and X-Quaterio-Event headers.
| Parameter | Type | Description |
|---|---|---|
urlrequired | string | HTTPS URL to receive webhook events |
eventsrequired | string[] | Events to subscribe to: document.created, document.deleted, document.exported, template.created, template.deleted, content.created, content.deleted |
description | string | Optional label for this webhook (max 500 chars) |
/api/v1/webhooks/:idGet a single webhook by ID.
/api/v1/webhooks/:idDelete a webhook.
Each delivery includes two headers for verification:
| Header | Description |
|---|---|
X-Quaterio-Signature | HMAC-SHA256 of the raw body, prefixed with sha256= |
X-Quaterio-Event | The event type, e.g. document.exported |
List endpoints return paginated results. Use query parameters to control page size and offset.
| Parameter | Default | Description |
|---|---|---|
| page | 1 | Page number |
| perPage | 20 | Items per page (max 100) |
| lang | — | Filter by language code (e.g. en, sv, de) |
All errors return a consistent JSON structure with an error code and human-readable message.
| HTTP Status | Description |
|---|---|
| 400 | Validation error (missing or invalid parameters) |
| 401 | Missing or invalid API token |
| 403 | Insufficient tier (API requires Business or Enterprise) |
| 404 | Resource not found |
| 500 | Internal server error |
Sign up, create a template in the visual editor, generate your first PDF via API in about five minutes.