Skip to main content
POST
Roll back data migration
This endpoint undoes one row of List data migration history: one copied assistant, knowledgebase, tool, widget, dashboard, automation flow or voice, or one shared or moved phone number. It is the Rollback button of the Migration History table of the Data Migration page of your administration panel. A rollback cannot be undone. Each row is undone on its own. Rolling back an assistant does not roll back its knowledgebase, tools, automation flows or copied voice: they have their own rows, which Get data migration lists in the assistant’s log_ids. Before you roll back a row, can_rollback and rollback_effect in the history say whether it is possible and what it will do.
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. Rows of the owner’s own account can be rolled back only by the owner and by team members with Allow impersonate owner. A row of another platform returns 404.

What a rollback does

Every type is also refused:
  • When the row is not completed: it was already rolled back. The message is Can only rollback completed migrations.
  • While a migration of your platform is queued or running, whether it was started from the API, the AI connector or the Data Migration page. The message is A migration is running on your platform. Try again when it finishes. Meanwhile the history shows its completed rows with can_rollback set to false and this text. List data migrations shows when no migration is queued or running any more.
  • While another rollback of your platform is running at the same moment, from any administrator or channel. The message is Another rollback is in progress. Try again in a moment. Send the request again a moment later.
Refusals return 422, and nothing changes.

Path Parameters

integer
required
The ID of the history row, from List data migration history or the log_ids of Get data migration.
The request has no body.

Response

string
Migration rolled back.
object
The row, as in List data migration history, with the status rolled_back, can_rollback set to false and rollback_blocked_reason set to Can only rollback completed migrations., as the history shows it from now on

Rate limit

The data migration endpoints count toward the limit of 60 requests per minute for each account that the administration endpoints share. Rolling back also has its own limit: 20 per minute for each account, and 20 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