Description
Create domains.
Request URL
Mail API v1.0 POST /v1/domains
Request Paramters
| Parameter | Value | Style | Type | Description |
|---|---|---|---|---|
| X-Auth-Token | - | header | string | User Token |
| service_id | - | URI | UUID | Service ID |
| domain_name | - | plain | string | Domain Name Half-width alphanumeric, "-" and "." are only allowed. ※Cannot begin or end with a hyphen. All alphabet should be in small letters. The length of the label should be under 63, and the whole length of the domain should be under 253. |
Response Paramters
| Parameter | Value | Style | Type | Description |
|---|---|---|---|---|
| domain | - | plain | dict | - |
| service_id | - | plain | UUID | Service ID |
| domain_id | - | plain | UUID | Domain ID |
| domain_name | - | plain | string | Domain Name |
Request Json
{
"service_id": "(service_id)",
"domain_name": "example.com"
}
Normal response codes
200 - Success
Error response codes
401 - Access Denied
409 - Duplicate
Repeatable
No
Example
curl -i -X POST \
-H "Accept: application/json" \
-H "X-Auth-Token: 39be9f8d53044388b7f2e867eba8b140" \
-d
'{
"service_id": "1b508bb370c78b7a9d44",
"domain_name": "example.org"
}' \
https://mail-hosting.tyo1.cloud.z.com/v1/domains
HTTP/1.1 200 Success
Date: Tue, 09 Dec 2014 01:46:58 GMT
Server: Apache
Content-Length: 1003
Content-Type: application/json
{
"domain":{
"service_id": "cef6c1a8-14ff-4553-a8b3-8f2fef16ba79",
"domain_id": "08e16a49a",
"domain_name": "example.org"
}
}