Accounts-account-email-domain-usernames-mailboxName-mailbox:PUT

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

PUT accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox

Creates a mailbox for specified account and domain

Contents


Request

PUT accounts/{account}/email/{domain}/usernames/{mailboxName}/mailbox

URI Parameters

account - string
domain - string
mailboxName - string
The mailbox. String should meet the regexp [a-zA-Z0-9._-]+

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

{
    "password": "{password}", 
    "master": {master}
}
 


Parameters

password - string
The password. Required. The password should contain at least one letter and at least one digit. It should be at least 8 characters long. It should also not begin with "pass", and should not contain the second-level domain name of the service or the username of the mailbox.
master - boolean
Describes if this is a master account.

Response

Status Code

201 Created
Success
400 Bad Request
The format of the request body is invalid or the username does not meet the requirements.
401 Unauthorized
The supplied credentials are invalid or do not provide permissions for this operation.
404 Not Found
The domain name does not exist.

Examples

Trying to create mailbox without a password

Request

PUT accounts/test-account123/email/test.com/usernames/john.smith/mailbox

{"master": false}
 

Response

400 Bad Request

{"password":"Required"}
 

Create mailbox

Request

PUT accounts/test-account123/email/test.com/usernames/john.smith/mailbox

{"password": "pword1234", "master": true}
 

Response

201 Created
 


See also


blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox