Home
Version 3
Private Domains API

Private Domains API

Create a Private Domain owned by the given Organization

POST /v2/private_domains

Fields

Name Description Default Valid Values Example Values
guid The guid of the domain.
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.

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY5IiwiZW1haWwiOiJlbWFpbC01MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0NDcxNjg4fQ.exuybhWzPVgoGSdfchY3luBSTtF9PLQITqoxRvWuUBU
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/private_domains

Body

{
  "name": "exmaple.com",
  "owning_organization_guid": "20dc14c9-4c14-4232-9139-e3fa234f303a"
}

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "20dc14c9-4c14-4232-9139-e3fa234f303a"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTY5IiwiZW1haWwiOiJlbWFpbC01MEBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0NDcxNjg4fQ.exuybhWzPVgoGSdfchY3luBSTtF9PLQITqoxRvWuUBU" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/1b08e466-28d2-4f94-b1a0-7e46b484d550
X-VCAP-Request-ID: 7ef873a6-1ae2-4dd9-bd19-c116eb06646e
Content-Length: 417
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "1b08e466-28d2-4f94-b1a0-7e46b484d550",
    "url": "/v2/private_domains/1b08e466-28d2-4f94-b1a0-7e46b484d550",
    "created_at": "2015-02-13T22:34:48Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "20dc14c9-4c14-4232-9139-e3fa234f303a",
    "owning_organization_url": "/v2/organizations/20dc14c9-4c14-4232-9139-e3fa234f303a"
  }
}