docs-api-group-actionName

Rendering

Render by page ID

Render a page by ID from the publish cache, or from the database when draft: true. Requires API token. Does not accept full inline page payloads. Optional body field renderType (satori, takumi, html) overrides the template's rendererType. Use format pdf for the HTML + Chrome PDF pipeline (always uses the HTML renderer). For multi-page PDFs, send pageIds and optional tweaksPerPage (same length). Default response is application/json with timings and a URL to the uploaded render; set output to binary (or binary: true) to return raw bytes.

POST/api/render/index

Request body

PropertyTypeRequiredDescription
pageIdstringNoPage ID to render (required for png/svg/webp; optional for pdf when pageIds is set)
pageIdsarrayNoMultiple pages for merged PDF (format pdf only)
tweaksPerPagearrayNoPer-page tweaks aligned with pageIds when rendering PDF
templateIdstringNoOptional; when set, validated against the page's template (parallel fetch)
draftbooleanNoIf true, load page and template from database instead of publish cache. Default: false
formatpng | svg | webp | pdfNoOutput format. Default: png. pdf uses HTML + Chrome.
tweaksobjectNoVariable overrides; keys may use dot paths for nested values. For Variable[] sources, use "varId.nested.path" when patching object values.
brandTweaksobjectNoBrand token overrides by dot path (e.g. logos.icon or brand.logos.icon). Merged into resolved brand tokens before render.
emojiTypestringNoe.g. twemoji, openmoji. Default from template
outputjson | binary | image | rawNoResponse shape: omit or json for application/json (default); binary, image, or raw for raw body
binarybooleanNoIf true, same as output binary (raw body)
renderTypesatori | takumi | htmlNoOverride rendering engine. Ignored when format is pdf (HTML pipeline).

Responses

200

Default: application/json with render metadata and file.url. With output binary: image/png, image/svg+xml, image/webp, or application/pdf.

400

Invalid body (e.g. missing pageId)

401

Missing or invalid API token

404

Page or template not found

Request
curl -X POST "https://bannx.com/api/render/index" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"pageId":"string","pageIds":null,"tweaksPerPage":null,"templateId":"string","draft":false}'
Response
// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format