Migrations

cPanel, after a mail move: copy the moved mailboxes from the old server over IMAP (the existing IMAP import, Email → mailbox → Import): the mail that reached the old server after the backup was made, or every message of a live connection. Each mailbox's password on the old server is sent once to the mail server, which keeps it for the copy (it repeats every 20 minutes until stopped under Email); Hostingsurge never stores, logs or returns it. Or skip: leave a mailbox's remaining messages on the old server. The move stays partial until each is done or skipped

post/migrations/{migrationId}/mail/sync

Request

  • Base URL: https://hostingsurge.com/api/v1
  • URL: https://hostingsurge.com/api/v1/migrations/{migrationId}/mail/sync
  • Auth: one of:
    • HTTP bearer
    • API key in cookie __Host-hs_session

Path parameters

migrationIdstring uuid required
Example:3f2b8a4e-5c1d-4e8f-9a7b-2c6d1e0f4a5b

Request body

hoststring

The old mail server (IMAP over TLS; default: mailMove.syncHost, the old host)

portinteger

Default 993

keepPasswordsboolean

Also make each password given the mailbox's password here, so its owner keeps signing in with it (only mailboxes whose old password did not move: new, unknown, set_by_owner, or pending after a copy that failed: copy_failed). Default false

skipstring[]

Mailboxes whose remaining messages stay on the old server: the user chose not to copy them. An earlier copy job of one is removed first (also one whose stop is still pending: stop_pending); no new copies start, a copy already under way may still finish. A mailbox whose copy runs (without stop_pending) or is done is left as it is

Response

The import with its mailMove (each mailbox's sync)

idstring uuid required
organizationIdstring uuid required
kind'git' | 'vercel' | 'netlify' | 'heroku' | 'wordpress' | 'database' | 'static-snapshot' | 'cpanel' | 'sftp' | 'php' | 'email' required
state'draft' | 'analyzing' | 'review' | 'importing' | 'verifying' | 'preview_ready' | 'cutover' | 'live' | 'failed' | 'canceled' required
namestring required
sourceobject required

non-secret source summary

projectIdstring uuid nullable required
databaseIdstring uuid nullable required
previewUrlstring nullable required
pushDeploy'github_app' | 'off'

Git-linked imports (git, and vercel/netlify/heroku from a repository): github_app: every push to the branch deploys through the organization's GitHub App installation; off: pushes do not deploy by themselves until the App covers the repository or the project's push-to-deploy webhook is added to it (audit F10)

envLaterstring[]

variables left without a value when the import started (StartMigrationInput.envLater)

envPendingstring[]

GET /migrations/{id}: the envLater variables the project still does not have; set them under its environment variables, then redeploy

valuesExpiredboolean

review: the variable values read from the old host were kept for 24 hours and are gone; analyze again (with a new token) before starting

cancelRequestedboolean required
createdAtstring required

ISO-8601 timestamp

updatedAtstring required

ISO-8601 timestamp

finishedAtstring nullable required

ISO-8601 timestamp

expiresAtstring required

ISO-8601 timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.