Accounts-accountNumber-web-domainName-aliases:POST

(Difference between revisions)
Jump to: navigation, search
 
m (1 revision: Release 105)

Revision as of 11:57, 3 April 2015

GET /accounts/{accountNumber}/web/{domainName}/aliases

Creates domain name alias.

Contents


Request

GET /accounts/{accountNumber}/web/{domainName}/aliases

URI Parameters

accountNumber - string
The user account to which the domain name and the domain name alias belong
domainName - string
The target domain name (domain name under which the site is actually hosted)

Request Headers

Authorization - HTTP Authorization header [1]
The Authentication credentials of the client application.

Request Body

{
    "domainAlias": "{domainAlias}"
}
 

Parameters

domainAlias - string
A valid domain name. Required.

Response

Status Code

202 Accepted
Success
400 Bad Request
The format of the request body is invalid or the alias 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.
409 Conflict
The mailbox already exists(on create) or domain is disabled(on update).

Examples

Failure creating a domain alias when required parameter is missing

Request

POST accounts/{account}/email/test.com/aliases

{"domainAlias": ""}
 

Response

400 Bad Request

{"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {"domainAlias": "Required"}}}

 

Failure creating a domain alias when passing invalid parameter

Request

POST accounts/{account}/email/test.com/aliases

{"domainAlias": "alias"}
 

Response

400 Bad Request

{"badRequest": {"guid": "", "message": "POST data error", "code": 400, "details": {"domainAlias": "Invalid domain name in domainAlias: test"}}}

 

Successfully creating a domain alias

Request

POST accounts/{account}/email/test.com/aliases

{"domainAlias": "alias.com"}
 

Response

202 Accepted

 

blog comments powered by Disqus

Personal tools
Namespaces
Variants
Actions
APIs
Navigation
Toolbox