---
title: "Export as an image"
method: POST
path: "/boards/{boardId}/export"
tags: ["Boards"]
---

# Export as an image

`POST /boards/{boardId}/export`

## Request

- Base URL: `https://api.mockflow.com/v1`
- URL: `https://api.mockflow.com/v1/boards/{boardId}/export`
- Auth: HTTP bearer

With `format: mp4`, a `video_maker` item is rendered on the server as an H.264 MP4 (up to 10 minutes,
up to 3840 x 2160) and the finished job's result carries `videoUrl`, `width`, `height`, `fps`,
`duration` and `bytes`. Server video renders are on paid plans.

A PNG of the whole board, one frame with everything inside it, or one item on its own, drawn by
the same renderer as the editor's Export. Drawing takes a browser, so this answers 202 with a Job;
poll it, and the finished job's result carries `imageUrl`, `width` and `height`.

* `board` is every item except comment pins, cropped to what they cover.
* `frame` is a frame (a section, design frame, diagram frame, mood board and the like) and the
  items fully inside it. A design frame is cropped to its canvas, under its title bar.
* `item` is one item alone, with nothing behind it.

The background is transparent. The image is published at an unguessable address: anyone with the
URL can open it, so treat the URL like the board content it shows. Very large areas are refused
before rendering: 20,000 x 20,000 pixels at scale 1, 10,000 x 10,000 at scale 2.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `callbackUrl` string, uri: Optional. When the job this request starts finishes or fails, a short body is POSTed here once: `{ eventId, status, boardId, boardUrl, imageUrl }`, where status is `succeeded` or `failed` and imageUrl is a picture of what the job drew, or null. Signed with the workspace's callback secret (GET /webhooks/callback-secret). https to a public host. The full job is on GET /jobs/{jobId}.
  - `target` 'board' | 'frame' | 'item': What to draw.
  - `itemId` string: The frame or item to draw. Required unless `target` is `board`.
  - `scale` 1 | 2: 2 doubles the pixels, for retina screens and print.
  - `format` 'png' | 'mp4': mp4 renders a video_maker item as a video. Needs target item; not on the Basic plan.
  - `quality` 480 | 720 | 1080 | 1440 | 2160: mp4 only. The video's short side in pixels, fitted inside 3840 x 2160.
  - `fps` 24 | 25 | 30 | 60: mp4 only. Frames per second. Defaults to the video's own setting, else 30.

## Response `202`

Export started. Poll the job; its result has the image, or the video for mp4.

- Job
  - `id` string
  - `kind` 'item.create' | 'item.update' | 'item.delete' | 'item.batch' | 'item.record' | 'ai.generate' | 'ai.modify' | 'skill.apply' | 'board.export'
  - `status` 'queued' | 'running' | 'succeeded' | 'failed'
  - `progress` integer
  - `message` string: Human readable progress, for example "Placing kanban".
  - `result` object, nullable
    - `itemIds` string[]
    - `updated` string[]
    - `deleted` string[]
    - `creditsUsed` integer
    - `boardTitle` string, nullable
    - `skill` string, nullable
    - `convertedFrom` string
    - `sourceDeleted` boolean
    - `target` 'board' | 'frame' | 'item': board.export. What was drawn.
    - `format` 'png' | 'mp4': board.export.
    - `scale` 1 | 2: board.export.
    - `imageUrl` string, uri: board.export. The PNG. Anyone with this URL can open it.
    - `width` integer: board.export. The image's width in pixels.
    - `height` integer: board.export. The image's height in pixels.
    - `videoUrl` string, uri: board.export with format mp4. The MP4. Anyone with this URL can open it.
    - `fps` integer: board.export with format mp4.
    - `duration` number: board.export with format mp4. Seconds.
    - `bytes` integer: board.export with format mp4. The file's size.
  - `error` Error (unresolved $ref)
  - `createdAt` string, date-time
  - `finishedAt` string, date-time, nullable
  - `callbackUrl` string, nullable: Where the job's result is POSTed
  - `callback` object, nullable: The newest delivery to callbackUrl, once the job has finished. Null until then, and when there is no callbackUrl.
    - `url` string
    - `deliveryId` string
    - `status` 'pending' | 'retrying' | 'succeeded' | 'failed' | 'cancelled'
    - `attempts` integer
    - `responseStatus` integer, nullable
    - `error` string, nullable
    - `deliveredAt` string, date-time, nullable
    - `nextRetryAt` string, date-time, nullable

## Other responses

- `429`: Too many requests.
- `4XX`: An error. See the envelope and the code list on the Errors page.

---

[API](https://skmtc.dev/mockflow/apis/mockflow-boards-api.md) - [All operations](https://skmtc.dev/mockflow/apis/mockflow-boards-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mockflow/apis/mockflow-boards-api/revisions/1a890390518c?raw)
