SnozeDevelopers
API referenceIntegrations

Run a named provider migration for a connection

Runs a migration registered for the connection's provider as a bounded series of syncs, and reports whether it completed or stopped partway with the objects imported so far, the guarantees the migration preserves, and any warnings; a partial result means the run should be repeated to continue. Requires the `integrations:write` workspace permission, and is rejected as invalid when the migration key is not registered for the provider or the provider has no adapter. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.

POST
/v1/workspaces/{workspaceId}/integrations/connections/{connectionId}/migrations/{migrationKey}/run
AuthorizationBearer <token>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

In: header

Path Parameters

workspaceId*string
connectionId*string
migrationKey*string

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/workspaces/string/integrations/connections/string/migrations/string/run"
{  "data": {    "migrationKey": "string",    "provider": "string",    "status": "succeeded",    "complete": true,    "preserves": [      "hierarchy"    ],    "warnings": [      "string"    ],    "runs": [      {        "id": "string",        "workspaceId": "string",        "connectionId": "string",        "dataSourceId": "string",        "provider": "string",        "status": "running",        "trigger": "string",        "cursorBefore": "string",        "cursorAfter": "string",        "stats": {},        "error": "string",        "startedAt": "string",        "completedAt": "string"      }    ],    "importedObjects": 0  }}