rename_user

The rename_user method changes a user's mailbox name; does not affect any of the existing email or settings. The mailboxes must be in the same domain.

📘

Caution:

When you rename an account, all of the history that is associated with that account is deleted and cannot be accessed by the email restore tool or the PAB (address book) restore tool. The renamed account begins accumulating history (backups) starting from the date that you rename the account, and email and PAB information can be restored only from this new history.

Syntax

{
    <credentials object>, 
    "user": <mailbox_name>, 
    "new_name": <newname>
}

Request fields for rename_user

The following fields can be used in the rename_user method:

Field nameObligationDefinition/Value
new_nameRequiredThe new name for the mailbox.
userRequiredThe current name of the mailbox.

Response fields for rename_user

The following fields may be returned in response to the rename_user method:

Field nameObligationDescription/Value
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.

Examples for rename_user

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "sw0rdf1sh"
  },
    "user": "[email protected]",
    "new_name": "[email protected]"
}

Response

{
   "success": true
}