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.
{
  "name": "exmaple.com",
  "owning_organization_guid": "e3ae57ea-eb9a-40fb-8a83-b3cf1d310e29"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNyIsImVtYWlsIjoiZW1haWwtOTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTk1ODM5Nn0._W5F363ZifoqyG2p-RWEDsY05J8ajSgEa-oGRy14TTA
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": "e3ae57ea-eb9a-40fb-8a83-b3cf1d310e29"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEyNyIsImVtYWlsIjoiZW1haWwtOTVAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ2MTk1ODM5Nn0._W5F363ZifoqyG2p-RWEDsY05J8ajSgEa-oGRy14TTA" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "3d9bb3c0-efb4-4ac5-8cbc-e52acb834913",
    "url": "/v2/private_domains/3d9bb3c0-efb4-4ac5-8cbc-e52acb834913",
    "created_at": "2016-04-22T19:33:16Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "e3ae57ea-eb9a-40fb-8a83-b3cf1d310e29",
    "owning_organization_url": "/v2/organizations/e3ae57ea-eb9a-40fb-8a83-b3cf1d310e29",
    "shared_organizations_url": "/v2/private_domains/3d9bb3c0-efb4-4ac5-8cbc-e52acb834913/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/3d9bb3c0-efb4-4ac5-8cbc-e52acb834913
X-VCAP-Request-ID: 6c980650-4acb-455c-a122-4b86b48a6a75
Content-Length: 530
X-Content-Type-Options: nosniff