Skip to main content

Errors

Every error response is RFC 9457 application/problem+json:

{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "No such template",
"error_code": "TEMPLATE_NOT_FOUND",
"request_id": "eb0315c5-14ad-4250-a8aa-2c7bb41fa26d"
}

Program against two fields:

  • error_code: stable and machine-readable. Branch on it, not on detail (human wording may improve over time) and not on the HTTP status alone (one status can carry several codes).
  • request_id: quote it when contacting support; it identifies the exact request.

Error codes are an open set: new codes may be added. Handle unknown codes by falling back on the HTTP status class.

Handling by class

ClassMeaningHandling
400The request is malformedFix the request; do not retry unchanged
401 / 403Key missing, not set up, or lacking scopeCheck the key and its scopes in the Console
404Resource doesn't exist (or its record expired)Check ids; note output expiry
409Conflict with current stateResolve the conflict (publish a version, change the idempotency key, …)
422The request is well-formed but can't be processedFix the data or content; the code says exactly what
429ThrottledBack off and retry with an idempotency key
5xxServer-side failureRetry with backoff and an idempotency key

Error code registry

400: malformed requests

CodeMeaning
INVALID_JSONThe body is not parseable JSON
INVALID_REQUESTThe body fails validation (the detail says where)
UNKNOWN_FIELDThe body contains a field the API doesn't recognize
INVALID_CURSORThe pagination cursor is malformed
INVALID_IDEMPOTENCY_KEYThe Idempotency-Key header is malformed
INVALID_STATUS_FILTERAn unsupported status query value
INVALID_VERSIONThe version value is not a valid version number
INVALID_RESPONSE_MODEresponse.mode is not binary or json
UNSUPPORTED_FILE_FORMATfile_format is not supported
INVALID_ACTORThe X-On-Behalf-Of value is malformed

401 / 403: authentication and authorization

CodeMeaning
MISSING_API_KEYNo x-api-key header
KEY_NOT_PROVISIONEDThe key is not set up for this API: check the Console APIs page
INSUFFICIENT_SCOPEThe key lacks the scope this operation requires

404 / 405: missing resources

CodeMeaning
ROUTE_NOT_FOUNDNo such endpoint
TEMPLATE_NOT_FOUND / VERSION_NOT_FOUND / ASSET_NOT_FOUND / JOB_NOT_FOUNDNo such resource in your account
OUTPUT_NOT_FOUNDThe output's retention window (~20 h) has passed
METHOD_NOT_ALLOWEDThe endpoint exists but not for this HTTP method

409: conflicts

CodeMeaning
CONCURRENT_MODIFICATIONAnother request changed the resource first; re-read and retry
IDEMPOTENCY_KEY_REUSEDSame key, different body
TEMPLATE_ARCHIVEDThe template is archived and cannot generate
NO_PUBLISHED_VERSIONNothing is published; publish or pin a version
NOTHING_TO_COPYThe copy source has no finalized version
UPLOAD_NOT_FOUNDFinalize was called but no base PDF was uploaded
VERSION_NOT_FINALIZEDThe version is still awaiting its base PDF

413 / 422: content that can't be processed

CodeMeaning
HTML_TOO_LARGEHTML content exceeds 1 MB
MISSING_ACTORA write without X-On-Behalf-Of
UNSUPPORTED_FIELD_TYPEA field type the API doesn't support
MISSING_MERGE_TAGS / INVALID_MERGE_VALUES / UNKNOWN_MERGE_TAGSStrict data validation failed
INVALID_PDF / BASE_PDF_TOO_LARGE / TOO_MANY_PAGESThe base PDF can't be used (finalize)
ASSET_TOO_LARGE / INVALID_IMAGEThe asset upload is over 2 MB or not a valid PNG/JPEG
GENERATION_WARNINGSWarnings occurred and the request set on_warning: "error"
BATCH_ITEMS_INVALIDOne or more batch items failed validation; per-item errors included
TABLE_OVERFLOWTable rows overflow the box and the field sets overflow: "error"
FILL_REQUIRES_TEMPLATEA fill field on a template-free document
RENDER_FAILEDThe document could not be rendered from the given content
HTML_RENDER_FAILED / HTML_RENDER_TIMEOUT / HTML_TOO_MANY_PAGESThe HTML document failed to render, took too long, or paginated past the page limit
HTML_REQUIRES_JSON_RESPONSEHTML documents require response.mode: "json"
HTML_TAGGED_CONFLICTtagged: true combined with fields/options/typography/flatten/unicode

5xx: server-side

CodeMeaning
INTERNAL_ERRORUnexpected failure; retry with backoff, then contact support with the request_id
SERVICE_UNCONFIGUREDThe service cannot serve this request; contact support

Errors vs. warnings

Errors fail the request; warnings never do. A value that can't be rendered (an unencodable glyph, a missing asset) is skipped and reported instead. See Warnings for that model and its registry, and on_warning to turn warnings into 422 GENERATION_WARNINGS when your workflow demands all-or-nothing.