Accounts-account-email-domain-usernames-mailboxName-webmail:POST

From Hostway API Documentation
Revision as of 06:05, 27 September 2013 by Stanimir.dimitrov (Talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

POST /accounts/{account}/email/{domain}/usernames/{mailboxName}/webmail

Creates OpenXchange account.

Contents


Request

POST /accounts/{account}/email/{domain}/usernames/{mailboxName}/webmail

URI Parameters

account - string
domain - string
mailboxName - string

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.
Content-Type
Required. Set this header to application/json; charset=UTF-8


Request Body

{
    "type": "{type}",
    "allowUpgrade": {allowUpgrade}
}
 


Parameters

allowUpgrade - boolean
OpenXchange allowUpgrade option value. The default value is true.
type - string - one of "standard", "activesync" or "premium"
OpenXchange account type. Valid values are standard, activesync, premium. If not provided - standard is default.

Response

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.

Examples

Failure creating account with not-valid parameter

Request

PUT /accounts/test/email/test.com/usernames/john.smith/webmail

{"type": "non-valid"}
 

Response

400 Bad Request

{"type": "\"non-existing\" is not one of standard, activesync, premium"}
 

Success creating account

Request

POST /accounts/test/email/test.com/usernames/john.smith/webmail

{"type": "standard", "allowUpgrade": false}
 

Response

201 Created


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox