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

(Difference between revisions)
Jump to: navigation, search
m (1 revision: Release 87)
(Failure creating account when mailbox qty for OX type is exceeded)
Line 26: Line 26:
 
{
 
{
 
     "type": "{type}",
 
     "type": "{type}",
     "allowUpgrade": {allowUpgrade}
+
     "allowUpgrade": {allowUpgrade},
 +
    "theme": "{theme}",
 +
    "language": "{language}",
 +
    "timezone": "{timezone}"
 
}
 
}
 
  </nowiki>
 
  </nowiki>
Line 36: Line 39:
 
; type - ''string'' - one of "standard", "activesync" or "premium"
 
; type - ''string'' - one of "standard", "activesync" or "premium"
 
: OpenXchange account type. Valid values are standard, activesync, premium. If not provided - standard is default.
 
: OpenXchange account type. Valid values are standard, activesync, premium. 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'.
  
 
== Response ==
 
== Response ==
Line 60: Line 70:
 
'''Request'''
 
'''Request'''
 
  <nowiki>
 
  <nowiki>
PUT /accounts/test/email/test.com/usernames/john.smith/webmail
+
POST /accounts/test/email/test.com/usernames/john.smith/webmail
  
 
{"type": "non-valid"}
 
{"type": "non-valid"}
Line 70: Line 80:
  
 
{"type": "\"non-existing\" is not one of standard, activesync, premium"}
 
{"type": "\"non-existing\" is not one of standard, activesync, premium"}
 +
</nowiki>
 +
 +
=== Failure creating account when mailbox qty for OX type is exceeded ===
 +
'''Request'''
 +
<nowiki>
 +
POST /accounts/test/email/test.com/usernames/john.smith/webmail
 +
 +
{"type": "activesync"}
 +
</nowiki>
 +
 +
'''Response'''
 +
<nowiki>
 +
400 Bad Request
 +
 +
{"computeFault":"Number of mailboxes exceeded"}
 
  </nowiki>
 
  </nowiki>
  
Line 77: Line 102:
 
POST /accounts/test/email/test.com/usernames/john.smith/webmail
 
POST /accounts/test/email/test.com/usernames/john.smith/webmail
  
{"type": "standard", "allowUpgrade": false}
+
{"type": "standard", "allowUpgrade": false, "language": "en_US", "timezone": "America/Chicago"}
 
  </nowiki>
 
  </nowiki>
  

Revision as of 08:28, 17 June 2014

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},
    "theme": "{theme}",
    "language": "{language}",
    "timezone": "{timezone}"
}
 


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.
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'.

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

POST /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"}
 

Failure creating account when mailbox qty for OX type is exceeded

Request

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

{"type": "activesync"}
 

Response

400 Bad Request

{"computeFault":"Number of mailboxes exceeded"}
 

Success creating account

Request

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

{"type": "standard", "allowUpgrade": false, "language": "en_US", "timezone": "America/Chicago"}
 

Response

201 Created


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox