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), as is the prefix over a UUID body (cvs_00000000-0000-4000-8000-000000000000). All three are permanent, supported inputs; only the canonical form is ever emitted.

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 (mp4 muxes audible video-fill audio) and require the page to actually carry animation — a still page is rejected with no_animation. For one stitched video of every page see scope=sequence, and for the canvas's persisted Main Edit timeline see scope=main_edit (both mp4 only).

scope
string
default:page

What the export renders: page (default — the historical single-page behavior, addressed by page_number), sequence (mp4 only — every visible page's animation stitched into ONE video, in canvas order, transitions included; the same lane as the editor's MP4 sequence export), or main_edit (mp4 only — the canvas's persisted Main Edit timeline, the NLE-style edit built in the editor or via the canvas edit API; it names its own pages). The stitched scopes take no page_number; sequence requires a multi-page canvas with animation timelines, main_edit requires a persisted Main Edit (single-page canvases are fine). Both share the per-artifact 18000-frame / 600 s mp4 ceiling with single-page video — the whole stitched video, not each page, must fit. Invalid combinations are rejected typed: gif/stitched and static-format/stitched as 400 invalid_request, a canvas with no animation document (or no persisted Main Edit) as 422 no_animation, an over-budget timeline as 422 animation_budget_exceeded.

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 (unless scope=sequence, which stitches every page and takes no page_number).

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.

video_quality
enum<string> | null

MP4 only: encode quality tier. standard (default) is the fastest encode; high and max spend more encode time for a sharper, larger file. Nothing about the render changes.

Available options:
standard,
high,
max
video_codec
enum<string> | null

MP4 only: video codec. h264 (default) plays everywhere; h265 (HEVC, hvc1-tagged) is markedly smaller on detailed footage but needs a modern player. The file is an .mp4 either way.

Available options:
h264,
h265
fps
integer | null

Animation formats only: capture frame rate. mp4 accepts 24, 30 (default), or 60; gif accepts 10, 12 (default), 15, or 24 — integer rates only (fractional rates like 29.97/59.94 are rejected, never silently rounded). The per-artifact frame ceiling is rate-independent and per-container (mp4 18000 frames / 600 s; gif 9000 frames / 300 s), so a higher fps shortens the longest exportable timeline (e.g. mp4 300 s at 60 fps vs 600 s at 30) — an over-budget request is rejected typed with the live bound.

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:

  • completed — url is the signed download URL.
  • in_progress — task_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.