Home
Version 3
Private Domains API

Private Domains API

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": "710f82b9-e9d6-474e-ab7c-5ff589416999"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyMSIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTd9.-lVW6dWjWAaQ49jvnX5hTsHtOkoUq8pjQOCjO2rz_cU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "710f82b9-e9d6-474e-ab7c-5ff589416999"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyMSIsImVtYWlsIjoiZW1haWwtMjM4QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzY4Mjk3OTd9.-lVW6dWjWAaQ49jvnX5hTsHtOkoUq8pjQOCjO2rz_cU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "cd22ecce-eade-483d-87ec-1773ae62fe56",
    "url": "/v2/private_domains/cd22ecce-eade-483d-87ec-1773ae62fe56",
    "created_at": "2015-07-06T23:23:17Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "710f82b9-e9d6-474e-ab7c-5ff589416999",
    "owning_organization_url": "/v2/organizations/710f82b9-e9d6-474e-ab7c-5ff589416999",
    "shared_organizations_url": "/v2/private_domains/cd22ecce-eade-483d-87ec-1773ae62fe56/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/cd22ecce-eade-483d-87ec-1773ae62fe56
X-VCAP-Request-ID: 20a7b563-e351-41a7-9f62-fd0b72bb17f7
Content-Length: 530
X-Content-Type-Options: nosniff