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": "ae03c8fa-14a3-47b3-b119-6bb59f2c1c9a"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNSIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MzMxMDk3NX0.wQnOkFlESLk9d3gCu7zDibSDT2Bym3Co2K2ksxanJvU
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": "ae03c8fa-14a3-47b3-b119-6bb59f2c1c9a"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEwNSIsImVtYWlsIjoiZW1haWwtNzJAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQ1MzMxMDk3NX0.wQnOkFlESLk9d3gCu7zDibSDT2Bym3Co2K2ksxanJvU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "66b6d34b-16ab-4b24-885b-930f86e17bac",
    "url": "/v2/private_domains/66b6d34b-16ab-4b24-885b-930f86e17bac",
    "created_at": "2016-01-13T17:29:35Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "ae03c8fa-14a3-47b3-b119-6bb59f2c1c9a",
    "owning_organization_url": "/v2/organizations/ae03c8fa-14a3-47b3-b119-6bb59f2c1c9a",
    "shared_organizations_url": "/v2/private_domains/66b6d34b-16ab-4b24-885b-930f86e17bac/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/66b6d34b-16ab-4b24-885b-930f86e17bac
X-VCAP-Request-ID: 
Content-Length: 530
X-Content-Type-Options: nosniff