POST api/2.0/mailserver/mailboxes/add This function requires authentication

Description

Creates a mailbox with the parameters specified in the request.

Parameters
Name Description Type Example
name
sent in body
Mailbox name string some text
local_part
sent in body
Mailbox local part string some text
domain_id
sent in body
Mailbox domain ID number 1234
user_id
sent in body
User ID string some text
notifyCurrent
sent in body
Specifies whether to notify the current user's email when a mailbox is created or not Bool value true
notifyProfile
sent in body
Specifies whether to notify the current user's profile when a mailbox is created or not Bool value true
Example
POST api/2.0/mailserver/mailboxes/add
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "name": "some text",
  "local_part": "some text",
  "domain_id": 1234,
  "user_id": "some text",
  "notifyCurrent": true,
  "notifyProfile": true
}
Returns

Mailbox data associated with the tenant

Example Response

application/json

{
  "status": 0,
  "response": {
    "Id": 1234,
    "UserId": "UserId",
    "UserDisplayName": "UserDisplayName",
    "Address": {
      "Id": 1234,
      "DomainId": 1234,
      "Email": "Email@only.com"
    },
    "Name": "Name",
    "Aliases": [
      {
        "Id": 1234,
        "DomainId": 1234,
        "Email": "Email@only.com"
      }
    ]
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>1234</Id>
    <UserId>UserId</UserId>
    <UserDisplayName>UserDisplayName</UserDisplayName>
    <Address>
      <Id>1234</Id>
      <DomainId>1234</DomainId>
      <Email>Email@only.com</Email>
    </Address>
    <Name>Name</Name>
    <Aliases>
      <Id>1234</Id>
      <DomainId>1234</DomainId>
      <Email>Email@only.com</Email>
    </Aliases>
  </response>
</result>