Skip to main content
POST
Export Canvas

Authorizations

Authorization
string
header
required

API key from Settings > Developer > REST API

Headers

Moda-Version
enum<string>
default:2026-05-01

Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.

Available options:
2026-04-12,
2026-05-01
Example:

"2026-05-01"

Path Parameters

canvas_id
string
required

Prefixed cvs_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working). Both are permanent, supported inputs.

Pattern: ^cvs_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
Example:

"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"

Query Parameters

format
string
default:png

Export format: png, jpeg, pdf, pptx, mp4, or gif. mp4/gif render a single page's animation timeline (server MP4s are silent) and require the page to actually carry animation — a still page is rejected with no_animation.

page_number
integer | null

1-indexed page number to export. Omit to export all pages — PDF/PPTX bundle every page natively, while multi-page PNG/JPEG are returned as a .zip of per-page files (page-1.png, page-2.png, …) since a single image container can't hold multiple pages. format in the response reflects what was actually delivered (zip in the bundled case). mp4/gif export exactly one page: required on a multi-page canvas, defaulted to 1 on a single-page one.

Required range: x >= 1
pixel_ratio
integer | null

Render scale multiplier (1-4). Higher values produce sharper exports at larger file sizes. Supported for PNG, JPEG, PDF, MP4, and GIF exports (mp4/gif default to 1 — page resolution). PPTX ignores this parameter.

Required range: 1 <= x <= 4
flatten
boolean
default:true

PDF only: produce a raster-only PDF with no searchable text, vector elements, or hyperlinks.

wait
boolean
default:true

When True (default), block up to ~20s for the export to finish before returning an in-progress handle. When False, return status='in_progress' with a task_id immediately — poll /canvases/{id}/export-status until terminal.

force_refresh
boolean
default:false

When False (default), reuse a cached export if the canvas is unchanged since it was rendered — fast, no browser render. Set True to force a fresh render.

Response

Successful Response

Response for POST /canvases/{id}/export.

Carries one of two shapes depending on status:

  • completedurl is the signed download URL.
  • in_progresstask_id lets the caller poll GET /canvases/{id}/export-status?task_id=... until terminal.
canvas_id
string
required

Prefixed canvas identifier for the canvas that was exported.

Pattern: ^cvs_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
Example:

"cvs_01HT9WK8N3M2J4A5Z6P7Q8R9TV"

canvas_url
string
required

Full URL to open the source canvas in the Moda editor.

format
string
required

Delivered format — png, jpeg, pdf, pptx, mp4, gif, or zip. A multi-page PNG/JPEG export (page_number omitted, canvas has >1 page) is bundled into a .zip of per-page files, so format is zip even though the request asked for an image format.

status
string
default:completed

completed when url is set, or in_progress when polling is required.

url
string | null

Signed download URL for the exported file (set when status='completed'). Expires in 7 days.

task_id
string | null

Export task ID set when status='in_progress'; poll the export-status endpoint with it.

retry_after_seconds
integer | null

Suggested poll interval when status='in_progress'.

total_pages
integer | null

Total page count for the source canvas (echoed for client convenience).

source
string | null

How the export was served: cache (existing artifact reused), slice (page extracted from a cached document, no render), or render (freshly rendered). null while status='in_progress'.

warnings
ExportWarning · object[]

Quality caveats about the delivered file — empty when nothing was degraded. Set on status='completed' only (an in-progress response makes no claim yet); a cached or sliced artifact carries the same lane-level caveats as a freshly rendered one.