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.eyJ1c2VyX2lkIjoidWFhLWlkLTYyIiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk4fQ.4uvdN658yFuNm6zf5rM6-34KDTJYbvHOR_5HtTsEhF4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/private_domains

Body

{
  "name": "exmaple.com",
  "owning_organization_guid": "7e74054f-2110-4e10-b0cc-9dce3ef496e8"
}

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "7e74054f-2110-4e10-b0cc-9dce3ef496e8"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTYyIiwiZW1haWwiOiJlbWFpbC01NUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDE2NTI2Njk4fQ.4uvdN658yFuNm6zf5rM6-34KDTJYbvHOR_5HtTsEhF4" \
	-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/1d50de0d-fde1-42f6-8611-75db597a18c4
X-VCAP-Request-ID: 1a7d1c6f-62ba-4867-9118-bcbd9182d46d
Content-Length: 422
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "1d50de0d-fde1-42f6-8611-75db597a18c4",
    "url": "/v2/private_domains/1d50de0d-fde1-42f6-8611-75db597a18c4",
    "created_at": "2014-11-13T23:38:18+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "7e74054f-2110-4e10-b0cc-9dce3ef496e8",
    "owning_organization_url": "/v2/organizations/7e74054f-2110-4e10-b0cc-9dce3ef496e8"
  }
}