Create a Shared Domain (deprecated)
POST /v2/domains
Request
Route
POST /v2/domains
Body
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.
|
|
|
|
{
"name": "example.com",
"wildcard": true
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/domains" -d '{
"name": "example.com",
"wildcard": true
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2NCIsImVtYWlsIjoiZW1haWwtMTg4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTV9.X2KgG5qFNj3kw1a5jxszsu9nMg6KTu4CCRhmyu0J-CE" \
-H "Host: example.org" \
-H "Content-Type: application/json" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "8cc3c795-8f03-472c-b03a-33388f736588",
"url": "/v2/shared_domains/8cc3c795-8f03-472c-b03a-33388f736588",
"created_at": "2016-06-08T16:41:35Z",
"updated_at": "2016-06-08T16:41:26Z"
},
"entity": {
"name": "example.com",
"router_group_guid": null,
"router_group_type": null
}
}
Headers