Skip to main content

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 a templateId, with optional data and delivery, so an unstored definition can be bound and mailed in one request. See Generate.
  • OAuth 2.0 token endpoint. POST /oauth2/token uses the client credentials grant (RFC 6749), so any OAuth 2.0 library can get a token. scope narrows it. See Authentication.
  • One error format. Every refusal is RFC 9457 Problem Details with a stable code, detail, target and a type linking to Errors, where every code is documented. It replaces five earlier shapes.
  • Idempotency-Key on 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.
  • ETag and If-Match on templates, webhook endpoints, organization settings, members, API keys and email delivery settings: a change made to an outdated version is refused with 412 PRECONDITION_FAILED, so two people editing the same thing no longer overwrite each other. Optional.
  • Request-Id on every response, and requestId on errors and webhook events, to find a request in the Activity panel.
  • Rate limit headers. RateLimit-Policy and RateLimit show each limit and what remains; a 429 names the limit in violated-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, and nextLink is the URL of the next page while there is one. GET /documents and GET /templates answered a bare array; the page size is now maxpagesize, in place of limit, offset and X-Total-Count. See Documents and Templates.
  • Status codes follow HTTP. Creating an asset or a folder answers 201 Created with a Location header (was 200). Mailing stored documents answers 202 Accepted (was 200). Deleting documents or templates by id answers 204 No Content with no body (was 200 with { "deleted": n }). Deleting something already gone answers 204, or 412 with If-Match. See Response format.
  • Values from a fixed set are camelCase strings, spelled the same everywhere. A generation's status is "succeeded" (was "Succeeded"); a template's visibility is "private", "shared", "community" or "example" (was 0 to 3). 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, 403 and 404 has an error body with a code.
  • A 429 or 409 IDEMPOTENCY_KEY_IN_FLIGHT says "isRetryable": true.
  • Reusing an Idempotency-Key with a different body is refused with 422 IDEMPOTENCY_KEY_REUSED, whatever the body's size.
  • A slow request body is answered 408 REQUEST_TIMEOUT (was BAD_REQUEST).
  • Unreadable JSON is refused naming the field and position.
  • A 201 for a resource with no address of its own has a Location pointing to its list.
  • A DELETE under an organization that does not exist answers 404.
  • An encryption password containing U+200B or a Unicode noncharacter is refused with PROHIBITED_PASSWORD.
  • The audit export (audit.ndjson) is ordered by sequence.
  • Inviting a member draws from the strict budget (5 a minute). AI drafting shares one drafting budget per organization (5 a minute); prompt takes up to 4,000 characters, priorDefinition up 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 (was 503), 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 /pdf or /docx to generate-from-payload and generate-from-template; PDF stays the default, and any other value is a 400.
  • What the upgrade adds:
    • Accessible PDF when you ask for it. A ua-1 or ua-2 claim in metadata.conformance now 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 docx entry in metadata.conformance (strict or transitional) is now enforced: a strict claim 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 sizeClass and charge say 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.
  • 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 400 SIGNATURE_NOT_APPLIED; nothing is generated, stored or billed.
  • A conformance claim in metadata.conformance is made only when the file meets it; otherwise it is withheld and reported as CONFORMANCE_WITHHELD.
  • Generated documents no longer expire: expiresAt is null. The response also carries sizeClass and charge.

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 its document / component root 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 carry Deprecation and Sunset headers. A word that cannot be carried without changing the document, and every old word after that date, is refused with RETIRED and a retired list naming the replacement. See Errors.
  • An array element is reached with a digit segment, $data.items.0.name; the bracket form $data.items[0].name is 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 (413 PAYLOAD_TOO_LARGE).
  • API keys work on paid plans and during the free plan's trial (402 API_ACCESS_NOT_IN_PLAN otherwise); the free plan's monthly allowance answers 402 MONTHLY_ALLOWANCE_REACHED.
  • generate-from-template also takes an inline docDefinition.
  • Templates store their sample data in data; GET /templates is paged (limit, offset, X-Total-Count).
  • DELETE /documents deletes generated documents by id; GET /documents is 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 shapes array form (Content-level shapes + sibling viewBox / padding). Use the svg block with children.
  • padding. For breathing room around auto-sized art, author an explicit viewBox.

New / changed:

  • viewBox now lives inside the svg block — still a numeric array, [W, H] or [minX, minY, W, H] (same convention as table / columns widths). Omit it to auto-derive the tight box from the children — now including path and textPath curves, which are flattened into the box, so curve art auto-sizes too.
  • width / height (points) set the rendered display size while viewBox stays the coordinate space — so a pasted icon keeps its native d and viewBox and just gets a size (e.g. a 0 0 1024 1024 glyph with "width": 24). Give one to scale uniformly, or both.
  • Schema definition renames: CanvasCommand → SvgElement, CanvasImageShape → SvgImageShape, CanvasBarcodeShape → SvgBarcodeShape. Tooling that references these $ref names should update.

Migration:

  1. Wrap shapes in { "svg": { "children": [ … ] } }.
  2. Move the sibling viewBox array inside the svg block (it stays a numeric array — no conversion).
  3. Drop padding — set an explicit viewBox if you relied on it for margin.
  4. Inside a g group, use children (not shapes).

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.

BeforeAfterMaps to SVG
lineDashstrokeDasharraystroke-dasharray
lineDashPhasestrokeDashoffsetstroke-dashoffset
lineCapStylestrokeLinecapstroke-linecap
lineJoinStylestrokeLinejoinstroke-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 fonts document 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].name accesses 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​

BeforeAfterNotes
POST /tenants/{tenantId}/documents/generatePOST /tenants/{tenantId}/documents/generate-from-payloadClarifies that the client sends a full document definition
POST /tenants/{tenantId}/documents/generate-from-jsonfileRemovedUse 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.json for 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 $data binding
  • Template testData field — 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.

BeforeAfterNotes
watermark.horizontalSpacing / verticalSpacingwatermark.spacingNow a [x, y] array matching the margin pattern
watermark.rotationwatermark.angleShorter, unambiguous

Bug Fixes​

  • Fixed watermark rendering — watermarks now render on every page
  • Fixed watermark style property not being applied
  • Fixed SVG drawArc using fill+stroke instead of stroke only

Improvements​

  • $data template binding — scalar refs, table dataProvider + dataMap, list dataProvider, form field defaults
  • Recursive $data resolution across all content types (columns, SVG, watermarks)