hosting

POST /v1/migrations/account-imports

Import a whole hosting account - every picked site, from one sign-in.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

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

Where your organisation id goes

This endpoint takes org_id as a field in the JSON body.

Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.

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/account-imports \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "source": <MigrationSource>, "host": <string>, "username": <string>, "picks": <AccountImportPick[]> }'

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

P4-050. A customer leaving a cPanel host with many sites signs in once (POST /v1/migrations/probe lists the account's sites) and picks the sites to bring. Each pick is checked exactly as a new site is (the domain rules, duplicates, the organisation's own sites and the plan's remaining room, flagged over_plan_limit so the screen can offer the plan that fits). With dry_run nothing is created and the check is answered (200). Otherwise one import job is started (202) with one item per valid pick: each item creates its site and starts that site's own migration through the same path as POST /v1/migrations, ten at a time with no cap on how many, and one site failing never stops the others. The sign-in is held in the secret store, never on a row or in a response, and is destroyed when the job settles. Requires hosting.import.manage and sites.create; the ownership attestation is required once for the whole account. Name the organisation with X-Zinn-Org when you belong to more than one.

Request body

NameTypeRequiredWhat it is
sourceMigrationSourceYesThe kind of hosting the site is being pulled from. ⛔ plesk is offered so the refusal can be specific and actionable, not because it is supported: pleskbackup is reachable…
hoststringYes—
usernamestringYes—
portintegerNo—
passwordstringNo—
private_keystringNo—
api_tokenstringNo—
mailbox_passwordsobjectNoaddress -> password for the account's mailboxes the probe listed in mailboxes_without_passwords. Every picked site's migration gets them (the probe reads the whole account);…
picksAccountImportPick[]Yes—
product_linestringNo—
ownership_attestedbooleanNoRequired true; asked once for the whole account.
dry_runbooleanNo—
org_idstringNo—

Response

NameTypeRequiredWhat it is
sitesAccountImportCheckedSite[]Yes—
validintegerYes—
quotaobject[]YesPer product line - the plan's remaining room and whether it is enough.

Errors this endpoint can return

401 · 403 · 422 · 503