Create a Private Domain owned by the given Organization
POST /v2/private_domains
Request
Route
POST /v2/private_domains
Body
Name |
Description |
Default |
Valid Values |
Example Values |
name
|
The name of the domain.
|
|
|
- example.com
- foo.example.com
|
owning_organization_guid
|
The organization that owns the domain. If not specified, the domain is shared.
|
|
|
|
{
"name": "exmaple.com",
"owning_organization_guid": "a36f2a14-84fc-4f9d-87ea-5ff84ef696b4"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/private_domains" -d '{
"name": "exmaple.com",
"owning_organization_guid": "a36f2a14-84fc-4f9d-87ea-5ff84ef696b4"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2IiwiZW1haWwiOiJlbWFpbC0zNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjM4fQ.Nq8UAA_eo3qMmSiquQ8fgLS7bbX6dHifbqq9HSMC8NA" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "90f0dc04-32b8-4af6-9834-67c8645f22db",
"url": "/v2/private_domains/90f0dc04-32b8-4af6-9834-67c8645f22db",
"created_at": "2016-04-06T00:17:18Z",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "a36f2a14-84fc-4f9d-87ea-5ff84ef696b4",
"owning_organization_url": "/v2/organizations/a36f2a14-84fc-4f9d-87ea-5ff84ef696b4",
"shared_organizations_url": "/v2/private_domains/90f0dc04-32b8-4af6-9834-67c8645f22db/shared_organizations"
}
}
Headers