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.
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.
/api/render/indexRequest body
| Property | Type | Required | Description |
|---|---|---|---|
| pageId | string | No | Page ID to render (required for png/svg/webp; optional for pdf when pageIds is set) |
| pageIds | array | No | Multiple pages for merged PDF (format pdf only) |
| tweaksPerPage | array | No | Per-page tweaks aligned with pageIds when rendering PDF |
| templateId | string | No | Optional; when set, validated against the page's template (parallel fetch) |
| draft | boolean | No | If true, load page and template from database instead of publish cache. Default: false |
| format | png | svg | webp | pdf | No | Output format. Default: png. pdf uses HTML + Chrome. |
| tweaks | object | No | Variable overrides; keys may use dot paths for nested values. For Variable[] sources, use "varId.nested.path" when patching object values. |
| brandTweaks | object | No | Brand token overrides by dot path (e.g. logos.icon or brand.logos.icon). Merged into resolved brand tokens before render. |
| emojiType | string | No | e.g. twemoji, openmoji. Default from template |
| output | json | binary | image | raw | No | Response shape: omit or json for application/json (default); binary, image, or raw for raw body |
| binary | boolean | No | If true, same as output binary (raw body) |
| renderType | satori | takumi | html | No | Override rendering engine. Ignored when format is pdf (HTML pipeline). |
Responses
Default: application/json with render metadata and file.url. With output binary: image/png, image/svg+xml, image/webp, or application/pdf.
Invalid body (e.g. missing pageId)
Missing or invalid API token
Page or template not found
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}'// Binary image (image/png, image/svg+xml, or image/webp)
// Or data URL for inline format