Skip to main content
POST
Preview data migration
This endpoint is a dry run of a migration: it returns what the selection would copy, the counts, the warnings and anything that would stop it, and writes nothing. It is the Preview Migration button of the Data Migration page of your administration panel. It is optional: Start data migration runs the same checks and refuses a selection that cannot run.
This endpoint is available to the account owner (with an active plan) and to team members with Platform Admin. Other users receive a 403 Forbidden error. The owner’s own account can be a source or a destination only for the owner and for team members with Allow impersonate owner. Users outside your platform are refused with 422.

What the preview checks

  • The users and the IDs: both users must be users you can pick, and every ID must be one that Get data migration items offers for the source user. These errors return 422.
  • The destination user’s limits, for the whole selection at once: assistants, knowledgebases, tools and voices, counting the knowledgebases and tools the assistants bring with them. Those already copied to this destination user by an earlier migration are reused, so they do not count.
  • Every phone number: a WhatsApp sender on the number, a missing or cancelled subscription, a number already shared with the destination user, and assistants that use the number but are not migrated with it.
  • The automation flows: each flow the selection would copy must be in the source user’s automation workspace, and the destination user must have a workspace. See Automation flows.
Whatever would stop the migration is listed in blocking_errors, with can_proceed set to false, and the response is still 200. items is then empty. Fix the selection, or the destination user’s limits, and preview again. The preview cannot predict everything: a document that fails to copy, an automation flow that fails to copy, and changes made between the preview and the start. A migration checks the selection again when it starts running. Automation flows are checked within 60 seconds. Flows that could not be checked in time are listed in flows_not_verified, are left out of items, and are checked again when the migration runs.

Request Body

The same body as Start data migration.
integer
required
The user to copy from, from List data migration users.
integer
required
The user to copy to, from List data migration users. It must be another user than the source.
integer[]
Assistants of the source user, from Get data migration items. Up to 1000.
integer[]
Phone numbers of the source user. Up to 1000.
integer[]
Knowledgebases to copy on their own. Up to 1000.
integer[]
Tools to copy on their own. Up to 1000.
integer[]
Widgets of the source user. Up to 1000.
string[]
Dashboards of the source user, by slug. Up to 100, each at most 100 characters.
string[]
Automation flows of the source user, from List data migration flows. Up to 50. Each ID has only letters, digits, - and _, and at most 64 characters.
integer[]
The source user’s own voices, to copy on their own. Up to 1000.
object
How the migrated assistants are copied, for every assistant of the migration.
At least one list must have an item. Unknown fields are refused.

Response

object
The preview

Rate limit

The data migration endpoints count toward the limit of 60 requests per minute for each account that the administration endpoints share. The preview also has its own limit: 10 per minute for each account, and 10 per minute for your whole platform, counted together for the API, the AI connector and the Data Migration page. Above a limit it returns 429, and the Retry-After response header tells you how many seconds to wait.

Example