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.
{
  "name": "exmaple.com",
  "owning_organization_guid": "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNyIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTl9.aEJYFhzik_xynDQ3l_kfqRGOxQLQjcb4QwQ34BmgFII
Host: example.org
Content-Type: application/json
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMzNyIsImVtYWlsIjoiZW1haWwtMjMyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NjYwMDg4OTl9.aEJYFhzik_xynDQ3l_kfqRGOxQLQjcb4QwQ34BmgFII" \
	-H "Host: example.org" \
	-H "Content-Type: application/json" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "b98aeca1-22b9-49f9-8428-3ace9ea2ba11",
    "url": "/v2/private_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11",
    "created_at": "2016-06-08T16:41:39Z",
    "updated_at": "2016-06-08T16:41:26Z"
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db",
    "owning_organization_url": "/v2/organizations/8483e4f1-d3a3-43e2-ab8c-b05ea40ef8db",
    "shared_organizations_url": "/v2/private_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/b98aeca1-22b9-49f9-8428-3ace9ea2ba11
X-VCAP-Request-ID: bf7dfaa7-050b-43a1-97ed-9d42f0360b14
Content-Length: 530
X-Content-Type-Options: nosniff