Move mail in from another provider
Copies mailboxes with their folders, read state and flags into the workspace's mailboxes on a domain with email on, and contacts too from Microsoft 365, creating mailboxes that don't exist yet without a password (reset one in updateMailbox). Google Workspace needs a super administrator to allow Cloady's client ID with domain-wide delegation, Microsoft 365 a global administrator's consent: `authorize` says how, and copying starts once it's done (runEmailMigration starts it at once). Only mailboxes the provider lists on the domain are copied, from a Google customer or Microsoft 365 tenant that owns the domain; a listed mailbox it doesn't list ends `canceled`. Google Workspace and Microsoft 365 answer 503 `provider_unavailable` while Cloady isn't set up for them. Migrations need a card on the workspace owner's account (402 `payment_required`), create missing mailboxes at 2 GB within the mailbox and storage limits (409 `mailbox_limit`, `storage_limit`, `storage_full`), copy one mailbox at a time per workspace, and refuse IMAP servers that resolve into a private network or the cluster (400 `bad_host`). Zoho and other IMAP servers copy mail with each mailbox's password, which is kept encrypted until the migration is canceled or 14 days after its last copy. Switch the domain's MX when the copy is done, then run the migration again to copy what arrived meanwhile. Needs the admin role.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/workspaces/string/mail/migrations" \ -H "Content-Type: application/json" \ -d '{ "provider": "google", "domain": "string", "admin": "string" }'{ "migration": { "id": "string", "domain": "string", "provider": "google", "status": "pending", "source": { "host": "string", "account": "string" }, "authorize": { "url": "string", "clientId": "string", "scopes": [ "string" ] }, "mailboxes": [ { "from": "string", "to": "string", "status": "pending", "messages": -9007199254740991, "copied": -9007199254740991, "error": "string" } ], "error": "string", "createdAt": "string", "startedAt": "string", "finishedAt": "string" }}List mail migrations GET
Every migration of mail into the workspace's mailboxes, newest first, with each mailbox's progress. Needs the admin role.
Cancel a mail migration DELETE
Stops a migration and forgets the passwords it was given; on a finished migration it only forgets the passwords. Mail already copied stays. Needs the admin role.