Use the rename operation to rename a mail account.
Request Packet Structure
A request XML packet setting a new name for an existing mail account should include the rename operation node:
The rename node does not have a separate type, it is nested within the MailTypeRequest type (
mail_input.xsd). The rename node has the following graphics representation:
- The site-id node is required. It identifies the site that owns the mail account. Data type: integer.
- The name node is required. It specifies the current name of the mail account. Data type: string.
- The new-name node is required. It specifies the new name for the mail account. Data type: string.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The rename node of the response packet is structured as follows:
- The result node is optional. It wraps the result of the requested rename operation. Data type: resultType (
- The status node is required. It returns the execution status of the rename operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Returns an error code when the rename operation fails. Data type: unsignedInt.
- The errtext node is optional. Returns an error message if the rename operation fails. Data type: string.
Renaming a single mail account
The following request packet renames mail account existing on the site with ID 11:
Renaming multiple mail acounts
To rename multiple mail accounts with a single packet, use a separate rename section for each: