Email-domain-usernames-mailboxName-webmail:POST
From Hostway API Documentation
(Difference between revisions)
Mike.robski (Talk | contribs) m (1 revision: Release 95) |
Corinne.chui (Talk | contribs) m (1 revision) |
||
(One intermediate revision by one user not shown) | |||
Line 34: | Line 34: | ||
; allowUpgrade - ''boolean'' | ; allowUpgrade - ''boolean'' | ||
: OpenXchange allowUpgrade option value. The default value is true. | : OpenXchange allowUpgrade option value. The default value is true. | ||
− | ; type - ''string'' | + | ; type - ''string'' |
− | : OpenXchange account type. | + | : OpenXchange account type. Supported values can be obtained from the [[Accounts-account-email-domain-webmailNames:GET|webmailNames API endpoint]]. If not provided - standard is default. |
: If current mailbox qty is more than allowed for specific OpenXchange account type the response is ''400 Bad Request'' | : If current mailbox qty is more than allowed for specific OpenXchange account type the response is ''400 Bad Request'' | ||
; theme - ''string'' | ; theme - ''string'' |
Latest revision as of 13:36, 30 May 2016
[edit] POST /email/{domain}/usernames/{mailboxName}/webmail
Creates OpenXchange account.
Contents |
[edit] Request
POST /email/{domain}/usernames/{mailboxName}/webmail
[edit] URI Parameters
- domain - string
- mailboxName - string
[edit] Request Headers
- Authorization - HTTP Authorization header [1]
- Use the mailbox owner credentials for the specific mailbox, e.g. username: email@domain.com, password: secret
- Content-Type
- Required. Set this header to
application/json; charset=UTF-8
[edit] Request Body
{ "type": "{oxtype}", "allowUpgrade": {allowUpgrade}, "theme": "{theme}", "language": "{language}", "timezone": "{timezone}" }
[edit] Parameters
- allowUpgrade - boolean
- OpenXchange allowUpgrade option value. The default value is true.
- type - string
- OpenXchange account type. Supported values can be obtained from the webmailNames API endpoint. If not provided - standard is default.
- If current mailbox qty is more than allowed for specific OpenXchange account type the response is 400 Bad Request
- theme - string
- Theme identifier for setting a specific theme when creating an OX account. If not provided , default theme is set.
- language - string
- OpenXchange account locale of type 'en_US'.
- timezone - string
- OpenXchange account timezone of type 'America/Chicago'.
[edit] Response
[edit] Status Code
- 201 Created
- Success
- 400 Bad Request
- The format of the request body is invalid or the OpenXchange account type does not meet the requirements.
- 401 Unauthorized
- The supplied credentials are invalid or do not provide permissions for this operation.
- 409 Conflict
- OpenXchange account already exists.
- 404 Not Found
- The domain name or mailbox do not exist.
[edit] Examples
[edit] Failure creating account with not-valid parameter
Request
POST /email/test.com/usernames/john.smith/webmail {"type": "non-valid"}
Response
400 Bad Request {"type": "\"non-existing\" is not one of standard, activesync, premium"}
[edit] Failure creating account when mailbox qty for OX type is exceeded
Request
POST /email/test.com/usernames/john.smith/webmail {"type": "activesync"}
Response
400 Bad Request {"computeFault":"Number of mailboxes exceeded"}
[edit] Success creating account
Request
POST /email/test.com/usernames/john.smith/webmail {"type": "activesync", "allowUpgrade": false, "language": "en_US", "timezone": "America/Chicago"}
Response
201 Created