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.eyJ1c2VyX2lkIjoidWFhLWlkLTg4IiwiZW1haWwiOiJlbWFpbC01OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTM0fQ.pz0ORNr2iJPkIx7zoo_5lt1-pTS5njz1JmxPNcxhOYQ
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/private_domains

Body

{
  "name": "exmaple.com",
  "owning_organization_guid": "3ad0248c-3297-4930-918e-57243c6b260d"
}

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "3ad0248c-3297-4930-918e-57243c6b260d"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg4IiwiZW1haWwiOiJlbWFpbC01OUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE1NzU0MTM0fQ.pz0ORNr2iJPkIx7zoo_5lt1-pTS5njz1JmxPNcxhOYQ" \
	-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/e58db4e3-1772-4135-9439-408c117ab655
X-VCAP-Request-ID: 93ce59e2-8617-422e-bb2e-389c6d77f620
Content-Length: 422
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "e58db4e3-1772-4135-9439-408c117ab655",
    "url": "/v2/private_domains/e58db4e3-1772-4135-9439-408c117ab655",
    "created_at": "2014-11-05T01:02:14+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "3ad0248c-3297-4930-918e-57243c6b260d",
    "owning_organization_url": "/v2/organizations/3ad0248c-3297-4930-918e-57243c6b260d"
  }
}