pem.exchange.addMailbox

This method is supported by Operations starting from version 2.6.5

This method creates an Exchange Mailbox.

There are the following use-cases of the method:

  • Create a Mailbox and assign the Mailbox to an existing Service User. In this case the user_id parameter should be specified. The new_user parameter should not be specified.
  • Create a Service User, create a Mailbox, and then assign the Mailbox to the created Service User. In this case the new_user parameter should be specified. The user_id parameter should not be specified.

The method has the following input parameters:

Name

Type

Short Description

[user_id]

int

ID of the existing Service User to which the Mailbox is assigned.

Notes:
1. The user_id and new_user optional parameters are mutually exclusive.
2. If the Service User has been bound to a Subscription containing services in the subscription-local mode (for example pem.addUser has been called and subscription_id has been specified), the system will use the subscription-local Hosted Exchange service from the same Subscription to create the Mailbox.
3. If the Service User has not been bound to any Subscription containing services in the subscription-local mode (for example pem.addUser has been called and owner_account_id has been specified), the system will use the account-wide Hosted Exchange service from an account Subscription containing services in the account-wide mode to create the Mailbox. In case when the account does not have the account-wide Hosted Exchange service, the method returns an error.
4. If the target account does not have the account-wide Hosted Exchange service and the target Service User is not bound to any Subscription and the Service User does not have services, use the pem.bindUserToSubscription method to bind the Service User to a Subscription containing the subscription-local Hosted Exchange service. After that it will be possible to create the Mailbox for the Service User using the subscription-local Hosted Exchange service.

[new_user]

struct

It defines properties of the new Service User.

Note: The user_id and new_user optional parameters are mutually exclusive.

  • subscription_id

int

ID of the Subscription.

Notes:
1. If the specified Subscription contains services in the subscription-local mode, the Service User will be bound to the Subscription and the subscription-local Hosted Exchange service from the specified Subscription will be used to create the Mailbox.
2. If the specified Subscription contains services in the account-wide mode, the account-wide Hosted Exchange service from the specified Subscription will be used to create the Mailbox.

  • login

string

Login of the Service User.

Note: If a Service User with the specified login already exists, Operations will try to assign the Mailbox to the existing Service User.

  • [password]

string

Password of the Service User. If the parameter is not specified, a password is generated by Operations.

  • [display_name]

string

Display Name of the Service User. If the parameter is not specified, the value of the login parameter is used as Display Name.

alias

string

It defines the Mailbox alias.

primary_email_address

string

It defines the primary e-mail address of the Mailbox. This address appears in the "From:" and "Reply-To:" fields of e-mail messages sent from the Mailbox.

owa

boolean

Whether the Outlook Web Access (OWA) support is enabled.

mapi

boolean

Whether the access over Outlook support is enabled.

active_sync

boolean

Whether the Active Sync support is enabled.

imap4

boolean

Whether access to Mailbox over IMAP4 support is enabled.

pop3

boolean

Whether access to Mailbox over POP3 support is enabled.

size_limit

int

It defines the maximum storage size (in Kilobytes) the mailbox can occupy before the system prevents the mailbox owner from sending and receiving more messages.

[alt_email_addresses]

array of string

It defines the list of additional e-mail addresses of the Mailbox. These e-mail addresses should be based on domains, which belong to the Customer's Subscription.

[skip_initialization]

boolean

Whether to skip the Mailbox initialization (Initialization is the setting of locale and creating the folders hierarchy for Mailbox). If parameter is omitted, the 0 value is used.

[mark_migrated]

boolean

Whether to mark the Mailbox as migrated from an external system. If this parameter is specified and its value is 1, the Mailbox is marked as migrated.

The method has the following output parameters:

Name

Type

Short Description

mailbox_id

int

ID of the created Mailbox.

Notes:

1. This method can also be called under Reseller permissions.

2. Service User ID is not displayed in Operations control panel. You may use the pem.getUserByLogin or pem.getUsers methods to obtain the ID of the required Service User. Also, you may use the Operations Public API methods, which contain Service User ID(s) in the list of their output parameters.