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": "65c3f366-c029-461d-9d8f-e4e0b4eeb654"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxOCIsImVtYWlsIjoiZW1haWwtMTM5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNDF9.ZY3lSgHwqT-GpBZtMniTPsV5QgE7bshDRMbaPmn3JDo
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": "65c3f366-c029-461d-9d8f-e4e0b4eeb654"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIxOCIsImVtYWlsIjoiZW1haWwtMTM5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0Mjk2NjQxNDF9.ZY3lSgHwqT-GpBZtMniTPsV5QgE7bshDRMbaPmn3JDo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "bbd951a7-c30a-4c7e-a04f-4776f2f350dd",
    "url": "/v2/private_domains/bbd951a7-c30a-4c7e-a04f-4776f2f350dd",
    "created_at": "2015-04-15T00:55:41Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "65c3f366-c029-461d-9d8f-e4e0b4eeb654",
    "owning_organization_url": "/v2/organizations/65c3f366-c029-461d-9d8f-e4e0b4eeb654",
    "shared_organizations_url": "/v2/private_domains/bbd951a7-c30a-4c7e-a04f-4776f2f350dd/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/bbd951a7-c30a-4c7e-a04f-4776f2f350dd
X-VCAP-Request-ID: 065273b2-c215-4655-a170-6cab04900011
Content-Length: 530
X-Content-Type-Options: nosniff