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": "6277b79c-f976-4306-904c-1165b7492333"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY4IiwiZW1haWwiOiJlbWFpbC02N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODQ4fQ.RDM_EZwuvZFAfQWSg_G77UKEnt2hBRdpTi96KHOSqWc
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": "6277b79c-f976-4306-904c-1165b7492333"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY4IiwiZW1haWwiOiJlbWFpbC02N0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM1MTAyODQ4fQ.RDM_EZwuvZFAfQWSg_G77UKEnt2hBRdpTi96KHOSqWc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "97ce41df-8235-40ce-af03-bb9e2fba6f9f",
    "url": "/v2/private_domains/97ce41df-8235-40ce-af03-bb9e2fba6f9f",
    "created_at": "2015-06-16T23:40:48Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "6277b79c-f976-4306-904c-1165b7492333",
    "owning_organization_url": "/v2/organizations/6277b79c-f976-4306-904c-1165b7492333",
    "shared_organizations_url": "/v2/private_domains/97ce41df-8235-40ce-af03-bb9e2fba6f9f/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/97ce41df-8235-40ce-af03-bb9e2fba6f9f
X-VCAP-Request-ID: 01be44b4-fdc5-478b-ab86-db811802053a
Content-Length: 530
X-Content-Type-Options: nosniff