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": "86dedc18-dbd3-48c2-8fed-7d9212dd59d3"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMyIsImVtYWlsIjoiZW1haWwtODhAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzODY0MTc5Mn0.a4If_0gO7TiGorzC_KzTv2SaTJUtIG17eCbhzr1Dh1I
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": "86dedc18-dbd3-48c2-8fed-7d9212dd59d3"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzMyIsImVtYWlsIjoiZW1haWwtODhAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQzODY0MTc5Mn0.a4If_0gO7TiGorzC_KzTv2SaTJUtIG17eCbhzr1Dh1I" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "11e49306-965c-46c3-97f4-9a7764cfe621",
    "url": "/v2/private_domains/11e49306-965c-46c3-97f4-9a7764cfe621",
    "created_at": "2015-07-27T22:43:12Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "86dedc18-dbd3-48c2-8fed-7d9212dd59d3",
    "owning_organization_url": "/v2/organizations/86dedc18-dbd3-48c2-8fed-7d9212dd59d3",
    "shared_organizations_url": "/v2/private_domains/11e49306-965c-46c3-97f4-9a7764cfe621/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/11e49306-965c-46c3-97f4-9a7764cfe621
X-VCAP-Request-ID: 26f96ad7-3d42-48aa-b20f-d7448095c10b
Content-Length: 530
X-Content-Type-Options: nosniff