Maker

API documentation

Create PDFs and screenshots from any URL or HTML, and merge, encrypt or write onto existing PDFs. The API is request-compatible with the Docamatic v1 API, so existing integrations only need a new base URL and key.

Basics

Base URL/api/v1
AuthenticationAuthorization: Bearer YOUR_API_KEY
BodyJSON (Content-Type: application/json). Unknown parameters are rejected.
Rate limit120 requests per minute per key by default (HTTP 429 when exceeded).
StorageDocuments are kept for 48 hours by default, then deleted. Delete earlier with DELETE /delete.

Quick start

curl -X POST /api/v1/pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source": "https://news.ycombinator.com", "format": "A4", "media": "print"}'

Response

{
  "document": "/files/0b9c…e1.pdf",
  "size": "85.79 KB",
  "success": true,
  "transaction_id": "0b9c…e1"
}

With "encode": true, document holds the file as base64 instead of a URL (files over 4 MB still return a URL). Base64 results are not stored.

POST /pdf URL or HTML to PDF

ParameterTypeDefaultDescription
sourcestringrequiredA URL (http/https) or an HTML string.
mediastringscreenscreen or print CSS media.
formatstringLetterLetter, Legal, Tabloid, Ledger, A0–A5. Overrides width/height.
width, heightnumberCustom paper size (when format is not set).
unitstringcmUnit for width/height: px, in, cm, mm.
margin_top, margin_right, margin_bottom, margin_leftnumber0Page margins.
margin_unitstringcmpx, in, cm, mm.
landscapebooleanfalseLandscape orientation.
zoomnumber1Scale, 0.1 to 2.
disable_backgroundsbooleanfalseLeave out background colours and images.
grayscalebooleanfalseBlack and white output.
delayintegerExtra wait before capture, 100–9000 ms.
header_template, footer_templatestringHTML for each page's header/footer. Elements with class date, title, url, pageNumber, totalPages are filled in. Set a font-size, as Chrome's default is tiny.
header_footerbooleanShow header and footer.
page_numbersbooleanfalseAdd "1 / 3" style page numbers (ignored when footer_template is set).
cssstringCSS string, or a public URL to a stylesheet, injected before rendering.
prefer_css_page_sizebooleanfalseUse the page's CSS @page size.
page_rangesstringallFor example 1-5, 8, 11-13.
accept_cookie_warningbooleantrueAccept cookie consent banners automatically.
click_elementsstring[]Click these before rendering, by button text or CSS selector, e.g. ["Show more", ".expand"].
authobject{"username": "…", "password": "…"} for HTTP basic-auth sites. Sent only to the source's own origin.
namestringDocumentLabel, used as the download file name.
testbooleanfalseTest mode: "SAMPLE" watermark, uses test credits.
encodebooleanfalseReturn base64 instead of a URL.
Extensions (not in Docamatic)
full_pagebooleanfalseOne continuous page, identical to the page in a desktop browser window. Ignores paper size, margins and headers.
fit_to_widthbooleanfalseKeep the desktop layout and scale it to the paper width (instead of reflowing to a narrow, tablet-like layout).
viewport_width, viewport_heightinteger1440, 900Browser window size used to load the page.
wait_for_selectorstringWait until this CSS selector exists before capturing.

POST /image Screenshot

Also available as POST /screenshot. Takes source, media, grayscale, css, delay, accept_cookie_warning, click_elements, auth, name, test, encode as above, plus:

ParameterTypeDefaultDescription
file_typestringpngpng, jpg, webp.
width, heightnumber1440 × 900Window size.
unitstringpxpx, in, cm, mm.
mobilebooleanfalseEmulate a mobile device (honours the meta viewport tag).
landscapebooleanfalseSwap width and height.
full_pagebooleanfalseCapture the whole scrollable page.
clipobject{"x", "y", "width", "height", "unit"}: capture only this area.
qualitynumber1Pixel density, 1 to 3.

POST /template Ready-made documents

Fill a ready-made design with your data. Every field inside data is optional: supply only what you want to show. Try each one with sample data on the Templates tab; GET /template-samples.json returns a complete example request for every template.

{
  "template": "shipping_label_4x6",
  "data": {
    "sender_name": "Acme", "sender_address1": "787 Brunswick", "recipient_name": "Casey Williams",
    "recipient_address1": "57 Parkway", "recipient_address2": "New York", "barcode": "18935949030329293"
  }
}
ParameterTypeDefaultDescription
templatestringrequiredOne of the template IDs below.
dataobjectrequiredThe template's fields.
linesarray or objectLine items, if not given as data.items (data.lines for quotation2). Also accepts parallel arrays, as Zapier sends them: {"name": ["A", "B"], "price": ["$1", "$2"]}.
file_typestringpdfpdf, png, jpg, webp.
format, width, height, unit, landscapeLetter, cmPaper size, as for /pdf. Ignored by fixed-size labels.
fontstringRobotoAny Google Fonts family name, spelled exactly (e.g. Open Sans).
font_sizenumber0.8Text scale, 0.5 to 1.4.
font_colorstring#000000Text colour (hex).
qualitynumber1Pixel density for images, 1 to 3.
page_numbersbooleanfalsePage numbers (paged documents only).
grayscale, test, encode, nameAs for /pdf.

Images (logo, company_logo, item image, signature) can be public URLs or data:image/… URIs. Barcodes are Code 128.

TemplateSizeMain fields
invoice1 Invoice (detailed)papertitle, color, company_logo, order_number, order_date, payment, shipping, total_items, barcode, qr, bill_to_*, ship_to_*, items[image, description, sku, barcode, quantity, original_price, price, total], note, discount, subtotal, shipping_total, sales_tax_percentage, sales_tax, total, message_title, message_body, company_* (name, address, contact, website, vat_number, facebook/instagram/twitter as true/false). Every heading has a matching *_label field.
packing_slip1 Packing SlippaperAs invoice1 without prices, plus po_number, pickup_date, tracking_company, tracking_number, item_image_height, items[number, image, description, sku, barcode, qr, quantity].
returns_form Returns Formpaperorder_number, order_date, barcode, company_logo, return_from_*, return_to_*, items[image, description, sku, barcode, quantity], reason_code_a…d with reason_code_a_desc…d_desc, message_title, message_body, company_*. Return #, date and comments are left blank to fill in by hand.
invoice5 Invoicepaperlogo, title, invoice_number, date, from1…5, to1…5, items[name, description, price], total, currency, button1/2_text, _url, _svg (icon URL), message, header_rule_color, accent_color.
invoice4 Invoicepapertitle, color, logo, invoice_number, date, date_due, company_* (address1/2, city, state, zip, country, telephone, email, website, vat), bill_to_* (incl. email, vat), items[name, description, quantity, price, original_price, tax, total], discount, subtotal, shipping, sales_tax_label, sales_tax, total, notes.
invoice3 Invoice (services)paperlogo, title, invoice_number, date, date_due, company_*, bill_to_*, due, items[name, description, qty, unit_price, price, original_price], notes, discount, subtotal, shipping, sales_tax_label, sales_tax, total, payment_instructions, message, color.
quotation2 Quotation (detailed)papercompany{logo, name, address, contact, website}, title, subtitle, quote_name, quote_number, quote_date, quote_expiration, account_rep, phone, email, notes, purchasing_information[attribute, value], lines[description{title, subtitle, configuration[description, sku, quantity]}, quantity, unit_price, original_unit_price, special_price_valid_to, total], comments, sales_tax_percentage, sales_tax, subtotal, total, terms_and_conditions[], color, accent_color.
commercial_invoice Commercial Invoicepapertype, logo, invoice_number, airwaybill, export_date, export_reference, exporter_*, consignee_*, buyer_* (each with eori), country_of_export, reason_for_export, country_of_ultimate_destination, items[goods_description, country_of_manufacture, hs_code, unit_of_measure, qty, unit_weight, unit_value, total_value], invoice_total, currency, total_packages, total_weight, incoterm, signature, name, signatory_company, date_signed, color.
shipping_label_4x64×6 in, fixedlogo, sender_name, sender_address1…3, sender_telephone, recipient_name, recipient_address1…4, order_number, reference, weight, barcode, instructions (plus *_label fields).
shipping_label_4x34×3 in, fixedsender, recipient_name, recipient_address1…4, reference, weight, barcode (plus *_label fields).
barcode_label4×3 in, resizabletitle, subtitle, barcode, label.
qr_label4×3 in, resizabletitle, subtitle, qr, label.
conference_badge4×6 in, fixedlogo, qr, first_name, last_name, company, attendee_type, color.

POST /write Add content to a PDF

source is a PDF URL or base64 string. Positions and sizes are in millimetres from the top-left corner. Omit a *_page_number to apply to every page.

{
  "source": "https://example.com/form.pdf",
  "text": [{"text_value": "Approved", "text_x": 20, "text_y": 30, "font": "Helvetica", "font_style": "B",
            "font_size": 18, "text_color": "#cb4335", "text_page_number": 1}],
  "cells": [{"text_value": "A longer paragraph that wraps…", "cell_x": 20, "cell_y": 40, "width": 120,
             "height": 6, "align": "J", "border": 1}],
  "images": [{"image_url": "https://example.com/logo.png", "image_x": 150, "image_y": 10, "image_width": 40}],
  "barcodes": [{"barcode_value": "ABC-123", "barcode_x": 20, "barcode_y": 250}],
  "qr_codes": [{"qr_code_value": "https://example.com", "qr_code_x": 170, "qr_code_y": 250, "qr_code_size": 25}],
  "page_numbers": true
}

Fonts: Arial, Helvetica, Courier, Times, PassionsConflict, ArchivoBlack. font_style is any of B, I, U. Cells take height (line height, required), width, align (L, C, R, J), border.

POST /merge

{"files": ["https://example.com/a.pdf", "https://example.com/b.pdf"], "name": "Combined"}

2 to 100 PDFs, as URLs or base64 strings, merged in order.

POST /encrypt

{"source": "https://example.com/report.pdf", "password": "pw123#", "encryption": "AES_256"}

encryption is AES_256 (default, Acrobat X or later) or AES_128 (Acrobat 7 or later). Password up to 60 characters. In test mode the password is always sample.

DELETE /delete

{"transaction_id": "0b9c…e1"}
→ {"message": "Delete successful", "url": "…", "success": true}

GET /credits

{"production": {"limit": 1000, "used": 250, "remaining": 750},
 "test": {"limit": 1000, "used": 0, "remaining": 1000},
 "period_start": "2026-11-01 00:00:00", "period_end": "2026-11-30 23:59:59"}

Also: GET /documents lists your stored documents, GET /templates lists the templates, and GET /me describes your key.

Errors

CodeMeaning
401Missing or invalid API key: {"message": "Unauthenticated."}
403Monthly credits used up.
404 / 405Unknown route or wrong HTTP method.
408The page took too long to render.
415The body is not valid JSON.
422Validation failed, or the source could not be loaded: {"message": "…", "errors": {"field": ["…"]}}
429Rate limit exceeded: {"message": "Too Many Requests"}
500Server error.

For security, URLs that resolve to private or internal network addresses (localhost, 10.x, 192.168.x, cloud metadata) are refused.