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": "02b02d68-986e-4486-8f67-74234a38fffb"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OCIsImVtYWlsIjoiZW1haWwtMjA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzl9.St4WWpe5P8bLp5PxdiPfaY0-UiuKoeaT9BVHDoza3-A
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": "02b02d68-986e-4486-8f67-74234a38fffb"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3OCIsImVtYWlsIjoiZW1haWwtMjA2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzl9.St4WWpe5P8bLp5PxdiPfaY0-UiuKoeaT9BVHDoza3-A" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d0248727-2949-4c4d-b111-c9e94c6365a6",
    "url": "/v2/private_domains/d0248727-2949-4c4d-b111-c9e94c6365a6",
    "created_at": "2015-05-07T23:37:19Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "02b02d68-986e-4486-8f67-74234a38fffb",
    "owning_organization_url": "/v2/organizations/02b02d68-986e-4486-8f67-74234a38fffb",
    "shared_organizations_url": "/v2/private_domains/d0248727-2949-4c4d-b111-c9e94c6365a6/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/d0248727-2949-4c4d-b111-c9e94c6365a6
X-VCAP-Request-ID: 49823147-c83b-40b4-8d22-9c6a9a5a855b
Content-Length: 530
X-Content-Type-Options: nosniff