creates a domain owned by the given organization (deprecated)
POST /v2/domains
Fields
Name |
Description |
Default |
Valid Values |
Example Values |
guid
|
The guid of the domain.
|
|
|
|
name
|
The name of the domain.
|
|
|
- example.com
- foo.example.com
|
wildcard
|
Allow routes with non-empty hosts
|
|
|
|
owning_organization_guid
|
The organization that owns the domain. If not specified, the domain is shared.
|
|
|
|
Request
Headers
Route
POST /v2/domains
Body
{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "c35ce826-db8d-4593-831d-ab1532cbb470"
}
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "exmaple.com",
"wildcard": true,
"owning_organization_guid": "c35ce826-db8d-4593-831d-ab1532cbb470"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM2IiwiZW1haWwiOiJlbWFpbC0yOUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE3NDYyMzUxfQ.F7WZ3xdJn5LE_xCW2YSWkLBgS00S7457fIGnSr1w5xU" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Headers
Status
201 Created
Body
{
"metadata": {
"guid": "ccdb8391-99b7-4f41-b266-26a9199e4760",
"url": "/v2/domains/ccdb8391-99b7-4f41-b266-26a9199e4760",
"created_at": "2014-11-24T19:32:31+00:00",
"updated_at": null
},
"entity": {
"name": "exmaple.com",
"owning_organization_guid": "c35ce826-db8d-4593-831d-ab1532cbb470",
"owning_organization_url": "/v2/organizations/c35ce826-db8d-4593-831d-ab1532cbb470",
"spaces_url": "/v2/domains/ccdb8391-99b7-4f41-b266-26a9199e4760/spaces"
}
}