migration_add
The migration_add job creates a bulk migration job that copies email from multiple remote accounts to multiple local accounts.
Syntax
{
<credentials object>,
"job": <job id>,
"users":
[
{
"local": <local email address user migrates to>,
"remote": <remote email address user migrates from)>,
"server": <remote server:remote port>,
"method": imap4 | imap4s | pop3 | pop3s,
"skip": [a list of folders on the remote server],
"translate": {
<remote server folder: local server folder>
...},
},
...
]
}
Request fields for migration_add
The following fields can be used in the migration_add method:
Field name | Obligation | Definition/Value |
---|---|---|
job | Optional | A job ID. This ID can be used in other migration requests. If an ID is not supplied in the request, it will be created and returned in the response. |
users | Required | Defines the source and destination of the email that you want to migrate. Allowed values are:
Note: For pop3 migrations, only email in the remote address' INBOX will be transferred (for imap4 migrations, mail in all remote folders will be copied to local folders with the same name.
Note: This value is optional, and is valid for imap migrations only. |
Response fields for migration_add
The following fields may be returned when the migration_add method is submitted:
Field name | Obligation | Description/Value |
---|---|---|
error | Returned if success = false | A text string that explains the error. |
error_number | Returned if success = false | A number that represents the error. |
job | Returned if success = true | A job ID. This ID can be used in other migration requests. |
success | Always returned | Indicates whether the request was successful or not. Allowed values are true and false. |
Examples for migration_add
Creates a job to migrate account [email protected] to local account [email protected], skipping the folders Trash and Spam, and moving messages from the remote folder Sent to the local folder Sent Items.
Request
{
"credentials": {
"user": "[email protected]",
"password": "sw0rdf1sh"
},
"users": [ {
"local": "[email protected]",
"remote": "[email protected]",
"password": "abc123",
"server": "mail.bigmail.com:993",
"method": "imap4s",
"skip": [
"Trash",
"Spam"
],
"translate": {
"Sent": "Sent Items"
}
}
]
}
Response
{
"success": true
"job": "1326229437638"
}
Updated less than a minute ago