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": "cc2c19aa-64ab-47b3-97c2-030a3d496c9c"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0zNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyMzEzNjA1fQ.n_wl3zupbgz7fbePWmAaseAMzoJVG7le3kqdCzrlT6g
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": "cc2c19aa-64ab-47b3-97c2-030a3d496c9c"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM1IiwiZW1haWwiOiJlbWFpbC0zNUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyMzEzNjA1fQ.n_wl3zupbgz7fbePWmAaseAMzoJVG7le3kqdCzrlT6g" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "20baa168-837e-4f4b-b823-df55de5c1549",
    "url": "/v2/private_domains/20baa168-837e-4f4b-b823-df55de5c1549",
    "created_at": "2015-05-15T16:53:25Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "cc2c19aa-64ab-47b3-97c2-030a3d496c9c",
    "owning_organization_url": "/v2/organizations/cc2c19aa-64ab-47b3-97c2-030a3d496c9c",
    "shared_organizations_url": "/v2/private_domains/20baa168-837e-4f4b-b823-df55de5c1549/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/20baa168-837e-4f4b-b823-df55de5c1549
X-VCAP-Request-ID: e4b1dc70-4c93-42f1-9c56-901eecba406b
Content-Length: 530
X-Content-Type-Options: nosniff