hosting

POST /v1/migrations/agent

Ask the AI migration agent to move a site, in words.

All hosting endpoints

All developer docs →

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/migrations/agent \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "message": <string> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

The conversational door onto the migration toolchain. Say what you want — "move my site from oldhost.example.com" — and the agent finds the site, works out which control panel the old host runs, plans the move, starts it when you say yes, watches it, and tells you what the comparison of the two sites found. Requires sites.view to ask. What the agent can actually do is decided per tool against your own permissions: a read-only member gets an assistant that explains a migration and cannot start one, and only a member with hosting.backup.manage is offered a rollback. The agent holds no identity of its own. confirm is the list of actions you have approved for this message — migration_start, migration_start_new_site (create the site here and move yours onto it, when you have none yet), migration_cancel or migration_rollback. The platform checks it against what you actually sent, so the assistant cannot start, stop or undo anything by claiming you agreed. credentials carries the login for your old host; it is used for this request and is never stored on the conversation, never returned, and never shown to the model.

Request body

NameTypeRequiredWhat it is
messagestringYesWhat you want, in your own words.
conversation_idstringNoContinue an existing thread. Omit to start a new one.
site_idstringNoThe site this thread is about, when you already know it.
confirmstring<migration_start, migration_start_new_site, migration_cancel, migration_rollback>[]NoThe actions you approve for this message, by name. The assistant cannot act on anything that is not in this list, however it words its own request — the platform compares its…
credentialsobjectNoThe login for your old host, in the same shape POST /v1/sites/{siteId}/migrations takes. Used for this request only: it is never stored on the conversation, never returned by…

Response

NameTypeRequiredWhat it is
conversationMigrationAgentConversationYes—
turnsMigrationAgentTurn[]YesBoth turns of this exchange — what you asked and what it answered.
failureobjectNoPresent only when the assistant itself could not be reached. It says which kind of failure it was, so you are told whether an AI provider is having an outage, whether your own API…

Errors this endpoint can return

401 · 403 · 404 · 422 · 429