---
title: "Preview a board import"
method: POST
path: "/imports/preview"
---

# Preview a board import

`POST /imports/preview`

## Request

- Base URL: `https://craaft.io/api/v1`
- URL: `https://craaft.io/api/v1/imports/preview`
- Auth: HTTP bearer

Parses an uploaded Trello, Jira, Asana, CSV or craaft export and
returns what `POST /imports` would create. Nothing is written. The
preview and the import run the same code, so the counts match.

`multipart/form-data`, file up to 5 MB. Limits per import: 2,000
cards, 200 columns, 500 checklist items on any one card, 20,000
checklist items and 20,000 comments in all, 200 CSV headers.
`source` is detected from the file when omitted. For CSV sources,
`mapping` replaces the server's suggested mapping: send every field
you want imported. The response then carries a `csv` block with the
headers, the mapping in use and the first sample rows. When no title
column can be guessed and no `mapping` is sent, the preview still
answers `200` with the `csv` block and an empty summary named after
the file, so the client can map the title and preview again.

Matched assignees who aren't you or a workspace owner or admin are
listed in `access`: the import adds them to the new private board
as contributors.

## Response `200`

What the import would create

- ImportPreview
  - `source` 'trello' | 'csv' | 'jira' | 'asana' | 'craaft', required
  - `name` string, required
  - `columns` object[], required
    - `title` string, required
    - `isDone` boolean, required
    - `cards` integer, required
  - `totals` object, required
    - `cards` integer, required
    - `archived` integer, required
    - `comments` integer, required
    - `checklistItems` integer, required
    - `tags` integer, required
  - `assignees` object, required
    - `matched` object[], required
      - `source` string, required
      - `userId` string, required
      - `name` string, required
    - `unmatched` string[], required
  - `access` object[], required: Matched assignees the import adds to the new private board as contributors: everyone matched except you and the workspace owners and admins, who already see every board.
    - `userId` string, required
    - `name` string, required
  - `warnings` object[], required
    - `code` string, required
    - `message` string, required
  - `csv` object: Present only for CSV sources (generic, Jira and Asana)
    - `headers` string[]
    - `mapping` object: The mapping in use, as sent or as suggested
    - `sample` array[]: The first 3 data rows
      - string[]

## Other responses

- `400`: No file, an unknown `source`, a malformed `mapping`, a file that isn't a recognised export of the given source, a CSV with no `title` in the `mapping` sent, a CSV with more than 200 headers ("This file has too many columns to map. The limit is 200"), or a file that isn't UTF-8 ("Save the file as UTF-8 CSV and try again").
- `401`: Missing or invalid token
- `413`: The file is over 5 MB
- `422`: Over a limit, worded with the real numbers: more than 2,000 cards ("This file has 2,001 cards. The limit is 2,000"; a CSV stops counting at the limit, "This file has more than 2,000 cards. The limit is 2,000"), more than 200 columns ("This file has 238 columns. The limit is 200"), more than 500 checklist items on a card ("A card has 1,234 checklist items. The limit is 500 per card"), more than 20,000 checklist items or comments in all ("This file has 25,000 comments. The limit is 20,000"); or no cards and no columns to import.
- `503`: Too many imports are running and none finished within 15 seconds ("Too many imports are running. Try again in a moment"). Retry after the `Retry-After` delay.

---

[API](https://skmtc.dev/craaft/apis/craaft-api.md) · [All operations](https://skmtc.dev/craaft/apis/craaft-api/llms.txt) · [OpenAPI document](https://skmtc.dev/craaft/apis/craaft-api/revisions/3a1e9d30d7dc?raw)
