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": "756ec16d-93f8-479c-90cf-2ef5c91dda47"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3IiwiZW1haWwiOiJlbWFpbC0yN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTc5fQ.hO76puya6sLbTfyDbe5kEOLIgEUevycI9wnkBz3oDHM
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": "756ec16d-93f8-479c-90cf-2ef5c91dda47"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI3IiwiZW1haWwiOiJlbWFpbC0yN0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTc5fQ.hO76puya6sLbTfyDbe5kEOLIgEUevycI9wnkBz3oDHM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "9240ce04-1c8c-406c-9f23-14d51ff1689a",
    "url": "/v2/private_domains/9240ce04-1c8c-406c-9f23-14d51ff1689a",
    "created_at": "2015-05-21T01:02:59Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "756ec16d-93f8-479c-90cf-2ef5c91dda47",
    "owning_organization_url": "/v2/organizations/756ec16d-93f8-479c-90cf-2ef5c91dda47",
    "shared_organizations_url": "/v2/private_domains/9240ce04-1c8c-406c-9f23-14d51ff1689a/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/9240ce04-1c8c-406c-9f23-14d51ff1689a
X-VCAP-Request-ID: 0f3b2472-dc5c-4d6e-83a9-684b7e0c5101
Content-Length: 530
X-Content-Type-Options: nosniff