Changelog
All notable changes to the DocPayload API and document definition schema.
A change that would stop an integration working is first deprecated: the old form keeps answering, with
Deprecation and Sunset headers naming its replacement and the date it ends. Earlier changes are marked BREAKING.
November 2026
This release brings the API in line with established REST API design guidelines and the HTTP standards most client libraries already speak: one error format, safe retries, optimistic concurrency, paged lists and a standard OAuth 2.0 token endpoint.
New
- Interactive API reference at api.docpayload.com/api-reference: every operation with its parameters and responses, and Authorize to try them with your own key.
- One generate route.
POST /documents/generate/{format}takes a definition or atemplateId, with optionaldataanddelivery, so an unstored definition can be bound and mailed in one request. See Generate. - OAuth 2.0 token endpoint.
POST /oauth2/tokenuses the client credentials grant (RFC 6749), so any OAuth 2.0 library can get a token.scopenarrows it. See Authentication. - One error format. Every refusal is RFC 9457 Problem Details with a stable
code,detail,targetand atypelinking to Errors, where every code is documented. It replaces five earlier shapes. Idempotency-Keyon generation and delivery: a retried request is answered as the first, and is generated, billed or mailed once. Keys last 24 hours. See Retrying safely.ETagandIf-Matchon templates, webhook endpoints, organization settings, members, API keys and email delivery settings: a change made to an outdated version is refused with412 PRECONDITION_FAILED, so two people editing the same thing no longer overwrite each other. Optional.Request-Idon every response, andrequestIdon errors and webhook events, to find a request in the Activity panel.- Rate limit headers.
RateLimit-PolicyandRateLimitshow each limit and what remains; a429names the limit inviolated-policies. The limits are named budgets; token requests now allow 13 a minute (was 7). See Rate limits. - New error codes:
INVALID_CONTENT_TYPE,NAME_TAKEN,UNAUTHORIZED,FORBIDDEN,RATE_LIMIT_EXCEEDED,REQUEST_TIMEOUT.
Changed in this release
These take effect now. Each makes a response mean what HTTP says it means, or closes a gap in what a key or a session may do.
- Lists answer an object, so a long list pages without skipping or repeating an item. Items are in
value, andnextLinkis the URL of the next page while there is one.GET /documentsandGET /templatesanswered a bare array; the page size is nowmaxpagesize, in place oflimit,offsetandX-Total-Count. See Documents and Templates. - Status codes follow HTTP. Creating an asset or a folder answers
201 Createdwith aLocationheader (was200). Mailing stored documents answers202 Accepted(was200). Deleting documents or templates by id answers204 No Contentwith no body (was200with{ "deleted": n }). Deleting something already gone answers204, or412withIf-Match. See Response format. - Values from a fixed set are camelCase strings, spelled the same everywhere. A generation's
statusis"succeeded"(was"Succeeded"); a template'svisibilityis"private","shared","community"or"example"(was0to3). Requests may still send the old forms. Expect new values to appear. - Deleting documents has a scope of its own,
document:delete, so a key that generates documents need not be able to delete them. Every role already holds it; only a key created with a hand-picked scope list needs it added. - New recovery codes (
POST /auth/recovery-codes:generate) ask for the account's password, sent as{ "currentPassword": "..." }, so a session left open cannot mint them.
Changes and fixes
- Every list refuses an unknown query parameter with
400. - Every
401,403and404has an error body with acode. - A
429or409 IDEMPOTENCY_KEY_IN_FLIGHTsays"isRetryable": true. - Reusing an
Idempotency-Keywith a different body is refused with422 IDEMPOTENCY_KEY_REUSED, whatever the body's size. - A slow request body is answered
408 REQUEST_TIMEOUT(wasBAD_REQUEST). - Unreadable JSON is refused naming the field and position.
- A
201for a resource with no address of its own has aLocationpointing to its list. - A
DELETEunder an organization that does not exist answers404. - An encryption password containing U+200B or a Unicode noncharacter is refused with
PROHIBITED_PASSWORD. - The audit export (
audit.ndjson) is ordered bysequence. - Inviting a member draws from the
strictbudget (5 a minute). AI drafting shares onedraftingbudget per organization (5 a minute);prompttakes up to 4,000 characters,priorDefinitionup to 65,536. - IPv6 callers are rate-limited per /64 network.
- Accepting an invitation never changes an existing account's password.
- An external service refusing a request is answered
502 EXTERNAL_HTTP_SERVICE_ERROR(was503), so clients and proxies no longer retry a request that would be refused again.
October 2026
DocPayload Colibri, our upgraded rendering engine
- PDF and DOCX now fully render on DocPayload Colibri, our own engine. It carries over what the previous renderers
did, both formats still from the same definition. Append
/pdfor/docxtogenerate-from-payloadandgenerate-from-template; PDF stays the default, and any other value is a400. - What the upgrade adds:
- Accessible PDF when you ask for it. A
ua-1orua-2claim inmetadata.conformancenow produces a tagged PDF, with structure, reading order and alternate text. The previous renderer wrote the same untagged file whether the claim was there or not. - DOCX in the conformance class you claim. A
docxentry inmetadata.conformance(strictortransitional) is now enforced: astrictclaim writes the package in Office Open XML Strict, and the class is stamped only when the package validates against the schemas, otherwise it is withheld and reported. The previous renderer wrote Transitional only. - Faster on long documents. In our measurements a 3,000-row table renders about 8 times faster using 17 times less memory, a 400-section report about 2.7 times faster, and complex-script text shapes 4 to 5 times faster.
- Lower prices for most documents. A faster, lighter engine costs less to run for each document, and we pass the
saving on: Pay-as-you-go goes from $0.25 to $0.15 per standard document, and $0.05 per small one; a large document
is $0.50. Each response's
sizeClassandchargesay which applied. Enterprise now includes 1,000 documents per user each month. - Barcodes as vectors. Every symbology is drawn as shapes on the page, sharp at any zoom and in print, rather than as a stretched bitmap. KIX, Korea Post, Ultracode and the HIBC QR, PDF417 and MicroPDF417 codes now render as the symbology they name; they used to come out as Code 128.
- Accessible PDF when you ask for it. A
- The response names what a document asked for and did not get:
errorCodes(IMAGE_NOT_LOADED,FONT_NOT_LOADED,SVG_NOT_LOADED,ATTACHMENT_NOT_EMBEDDED,UNRESOLVED_TOKEN,CONFORMANCE_WITHHELD,CONTENT_ERROR). Check it before you hand a document on. - A document that asks for a signature which cannot be applied is refused with
400SIGNATURE_NOT_APPLIED; nothing is generated, stored or billed. - A conformance claim in
metadata.conformanceis made only when the file meets it; otherwise it is withheld and reported asCONFORMANCE_WITHHELD. - Generated documents no longer expire:
expiresAtisnull. The response also carriessizeClassandcharge.
BREAKING — the definition is read exactly as the schema states it
This is our last breaking change. It completes the schema's alignment with the PDF, DOCX, HTML, CSS and SVG specifications, and from here on the schema only grows: no further breaking changes.
- Validation happens before anything is rendered or billed and answers
{ code, path, message }. A key or a value in another case ("CENTER"), an unknown key, or a definition without itsdocument/componentroot is refused (SCHEMA). A resource limit answers a code naming the limit. - Definitions written in the previous shape (
documentDefinition,margins,bookmark,colNumber,tabLeader,fixedPosition, ...) are translated until 1 April 2027, and those responses carryDeprecationandSunsetheaders. A word that cannot be carried without changing the document, and every old word after that date, is refused withRETIREDand aretiredlist naming the replacement. See Errors. - An array element is reached with a digit segment,
$data.items.0.name; the bracket form$data.items[0].nameis drawn as written and reported.
The schema moves from draft-07 to JSON Schema 2020-12
- After four years of intense iteration the document definition schema has reached full maturity, and it is now
published as JSON Schema 2020-12 rather than draft-07. Its shared definitions live under
$defs. - With it, the schema moves to its own subdomain:
https://schemas.docpayload.com/v1/document-definition.schema.json. The old address redirects there. - Nothing changes in what you send. If you also validate definitions on your side, point your tooling at a validator that implements 2020-12.
API
- Request bodies are capped at 1 MB (
413PAYLOAD_TOO_LARGE). - API keys work on paid plans and during the free plan's trial (
402API_ACCESS_NOT_IN_PLANotherwise); the free plan's monthly allowance answers402MONTHLY_ALLOWANCE_REACHED. generate-from-templatealso takes an inlinedocDefinition.- Templates store their sample data in
data;GET /templatesis paged (limit,offset,X-Total-Count). DELETE /documentsdeletes generated documents by id;GET /documentsis paged (limit,offset).
July 2026
BREAKING — Canvas fully adopted into SVG
Vector drawing is now authored entirely as SVG. A canvas is a single svg block that reads like an <svg> root — element names and properties mirror SVG, and an icon or snippet transfers with minimal translation.
{ "svg": { "viewBox": [0, 0, 24, 24], "width": 24, "children": [ { "path": { "d": "…", "style": "ink" } } ] } }
Removed:
- The
shapesarray form (Content-levelshapes+ siblingviewBox/padding). Use thesvgblock withchildren. padding. For breathing room around auto-sized art, author an explicitviewBox.
New / changed:
viewBoxnow lives inside thesvgblock — still a numeric array,[W, H]or[minX, minY, W, H](same convention as table / columnswidths). Omit it to auto-derive the tight box from the children — now includingpathandtextPathcurves, which are flattened into the box, so curve art auto-sizes too.width/height(points) set the rendered display size whileviewBoxstays the coordinate space — so a pasted icon keeps its nativedandviewBoxand just gets a size (e.g. a0 0 1024 1024glyph with"width": 24). Give one to scale uniformly, or both.- Schema definition renames:
CanvasCommand→SvgElement,CanvasImageShape→SvgImageShape,CanvasBarcodeShape→SvgBarcodeShape. Tooling that references these$refnames should update.
Migration:
- Wrap
shapesin{ "svg": { "children": [ … ] } }. - Move the sibling
viewBoxarray inside thesvgblock (it stays a numeric array — no conversion). - Drop
padding— set an explicitviewBoxif you relied on it for margin. - Inside a
ggroup, usechildren(notshapes).
Styling is unchanged — SVG presentation attributes via named styles (see the May 2026 property renames).
May 2026
Enum-value casing normalized to lowercase (non-breaking)
textAlign, borderCollapse, verticalAlign, and horizontalAlign values are now consistently lowercase in fixtures and docs ("center", "justify", "collapse", "middle", …). Engine parsers were then case-insensitive, so existing payloads using "CENTER" / "COLLAPSE" continued to render identically. Since October 2026 another case is refused; see above. Authors writing new templates should use lowercase to match the rest of the JSON enum surface ("portrait" / "landscape", "page" / "section", "butt" / "round" / "square", etc.).
BREAKING — SVG style property renames (SVG alignment)
Four SVG style properties renamed to match the SVG presentation attributes standard. Authors fluent in SVG / web SVG now author DocPayload SVG styles by ear; the old DocPayload-invented names are no longer recognized.
| Before | After | Maps to SVG |
|---|---|---|
lineDash | strokeDasharray | stroke-dasharray |
lineDashPhase | strokeDashoffset | stroke-dashoffset |
lineCapStyle | strokeLinecap | stroke-linecap |
lineJoinStyle | strokeLinejoin | stroke-linejoin |
Migration: search-and-replace the four JSON keys across your style definitions. Values are unchanged (butt/round/square for cap, miter/round/bevel for join, dash arrays as before). The [0] / [] "reset to solid" convention on strokeDasharray is unchanged.
No other changes: beyond these four JSON style keys, documents render exactly as before.
April 2026 (v2.4)
New Features
- Table of Contents —
{ "toc": {} }content element auto-generates a TOC from document headings. Clickable links with dotted leaders, right-aligned page numbers, and nested PDF outline bookmarks. Place it anywhere in the content flow — before all content, after a cover page, between sections. Configurable heading levels, title text, and styling. - Custom Fonts — Register TrueType/OpenType font families via the
fontsdocument property. Upload font files through the tenant assets API, then reference by family name in styles. Full 4-variant support (regular, bold, italic, boldItalic) with automatic fallback. Inline[b]/[i]tags use the correct custom font variants. Fonts are embedded in the PDF with full Unicode support. - Array Indexing —
$data.items[0].nameaccesses array elements by index in Data Binding paths. Works in both$data.*and$item.*contexts. Supports chained indexes ($data.matrix[0][1]), deep nesting ($data.company.bills[3].amount), and graceful fallback for out-of-bounds access. Since October 2026 an index is written$data.items.0.name; see above.
BREAKING — documentDefinition.dataProvider Removed
The dataProvider property on the root documentDefinition object has been removed from the schema and is no longer accepted.
This property was originally intended to link a document template to an external data source, but was never functional — Data Binding has always been handled externally at generation time (via the request payload). Any existing payloads using this property should remove it; the value was silently ignored.
BREAKING — Endpoint Renames
| Before | After | Notes |
|---|---|---|
POST /tenants/{tenantId}/documents/generate | POST /tenants/{tenantId}/documents/generate-from-payload | Clarifies that the client sends a full document definition |
POST /tenants/{tenantId}/documents/generate-from-jsonfile | Removed | Use generate-from-payload instead — send JSON in the request body |
Documentation
- Added Tutorials section with 14 complete document examples (invoices, shipping labels, NDAs, forms, and more)
- Added documentation for Encryption, E-Signature, Attachments, Bookmarks, JavaScript Actions, and Layers
- Added SVG and Paragraphs documentation pages
- All tutorials show Template + Data tabs with rendered PDF previews
New Features
- Heading elements (
h1–h5) — Semantic headings with built-in default sizing (24/18/14/12/10pt). No style definition needed —{ "h1": "Title" }just works. Custom styles override defaults. - Simplified list symbols — Use
"1","a","A","i","I"instead of verbose enum names.{ "ol": { "symbol": "A" } }renders A. B. C. - Input validation — Document definitions are validated before rendering. Unknown properties, type mismatches, and structural errors return a structured
{ code, path, message }response. - JSON Schema — Published at
https://schemas.docpayload.com/v1/document-definition.schema.jsonfor IDE autocomplete and validation. - Playground schema validation — Real-time validation in the editor with error markers, autocomplete, and hover tooltips.
POST /documents/generate-from-template— Generate PDFs from stored templates with$databinding- Template
testDatafield — Store test data alongside templates for playground testing
Improvements
[img]shorthand alias for the[image]Shortcode[color]shorthand alias for the[fontcolor]Shortcode[size]shorthand alias for the[fontsize]Shortcode
March 2026
BREAKING — Schema v2
The following properties were renamed for consistency. Update your document definitions accordingly.
| Before | After | Notes |
|---|---|---|
watermark.horizontalSpacing / verticalSpacing | watermark.spacing | Now a [x, y] array matching the margin pattern |
watermark.rotation | watermark.angle | Shorter, unambiguous |
Bug Fixes
- Fixed watermark rendering — watermarks now render on every page
- Fixed watermark
styleproperty not being applied - Fixed SVG
drawArcusing fill+stroke instead of stroke only
Improvements
$datatemplate binding — scalar refs, tabledataProvider+dataMap, listdataProvider, form field defaults- Recursive
$dataresolution across all content types (columns, SVG, watermarks)