---
title: "Test source mailboxes for a migration"
method: POST
path: "/customers/{id}/domains/{domain}/migrations/test"
tags: ["Partners"]
---

# Test source mailboxes for a migration

`POST /customers/{id}/domains/{domain}/migrations/test`

## Request

- Base URL: `https://faivelo.com/api/partner`
- URL: `https://faivelo.com/api/partner/customers/{id}/domains/{domain}/migrations/test`
- Auth: HTTP bearer

Log into every source mailbox on your own IMAP server (five at a time, at most 100 rows per call) and report per row: whether the login worked, how much mail is there, whether the Faivelo mailbox already exists, and whether the lot fits the customer's storage. Nothing is created and no password is returned. 10 calls per 10 minutes per partner. Requires `partner:write`.

## Path parameters

- `id` string, required
- `domain` string, required

## Request body

- PartnerMigrationRequest: The source server and the mailboxes, as CSV text or JSON rows (one of `csv` and `rows`)
  - `source` PartnerMigrationSource, required
    - `host` string, required
    - `port` integer
    - `tls` boolean
  - `csv` string: `email,password[,newPassword]`, one mailbox per line; an optional header line; cells may be double-quoted
  - `rows` object[]
    - `email` string, required
    - `password` string, required: The current password on the source server
    - `newPassword` string, nullable: The password the Faivelo mailbox gets; default: the same as `password`
  - `expectedBytes` object: Bytes per source address from the test, so create can refuse what does not fit before creating anything

## Response `200`

Per-row results and the storage fit

- object
  - `success` boolean
  - `data` PartnerMigrationTest
    - `rows` object[]
      - `line` integer: The line in the CSV (or the row index)
      - `email` string
      - `ok` boolean
      - `error` string, nullable: Why the row failed, in plain words
      - `exists` boolean: The Faivelo mailbox already exists (reused, password untouched)
      - `inMigration` boolean: Already part of the open migration for this source
      - `totalMessages` integer, nullable
      - `totalBytes` integer, nullable
      - `folders` integer, nullable
    - `summary` object
      - `rows` integer
      - `ok` integer
      - `failed` integer
      - `toCreate` integer
      - `existing` integer
    - `storage` PartnerMigrationStorage
      - `neededBytes` integer: Sum of the source mailboxes that would be created
      - `availableBytes` integer, nullable: Left in the customer's pool; null when it could not be read
      - `shortfallBytes` integer: 0 when it fits
      - `oversized` string[]: Source mailboxes larger than the quota a new mailbox gets
      - `unknownSizes` integer: Rows whose source reported no size (not counted)
      - `fits` boolean
      - `perMailboxQuotaBytes` integer

## Other responses

- `400`: Invalid input, or more than 100 rows
- `401`: Missing or invalid API key, or not a partner key
- `403`: The key lacks the required scope, or provisioning is refused (partner paused, customer cap reached)
- `404`: Not found, including any customer that is not yours
- `409`: Sandbox customer
- `429`: Rate limit exceeded

---

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