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": "79c1f83f-23d5-4634-a0e4-891fd420a681"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMjAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDR9.DcaP_oe_CIIeUrMCE_G_y4gwGoAUEK2HVtb2hQNwEHw
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": "79c1f83f-23d5-4634-a0e4-891fd420a681"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI0MCIsImVtYWlsIjoiZW1haWwtMjAwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDR9.DcaP_oe_CIIeUrMCE_G_y4gwGoAUEK2HVtb2hQNwEHw" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b143c4db-cfc1-4652-a2a4-69357b182cb3",
    "url": "/v2/private_domains/b143c4db-cfc1-4652-a2a4-69357b182cb3",
    "created_at": "2016-03-14T22:30:44Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "79c1f83f-23d5-4634-a0e4-891fd420a681",
    "owning_organization_url": "/v2/organizations/79c1f83f-23d5-4634-a0e4-891fd420a681",
    "shared_organizations_url": "/v2/private_domains/b143c4db-cfc1-4652-a2a4-69357b182cb3/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/b143c4db-cfc1-4652-a2a4-69357b182cb3
X-VCAP-Request-ID: 
Content-Length: 530
X-Content-Type-Options: nosniff