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": "60690891-baad-4660-9177-27f98ccffb08"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNyIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NjF9.J3ACcQOgrH3F2V2Ih-kyr5EACun9KfBzS6-ux5w70w8
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": "60690891-baad-4660-9177-27f98ccffb08"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyNyIsImVtYWlsIjoiZW1haWwtMjMwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDU1NTc5NjF9.J3ACcQOgrH3F2V2Ih-kyr5EACun9KfBzS6-ux5w70w8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6f89317d-d109-487e-92cc-a5ef6da94488",
    "url": "/v2/private_domains/6f89317d-d109-487e-92cc-a5ef6da94488",
    "created_at": "2015-10-15T23:52:41Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "60690891-baad-4660-9177-27f98ccffb08",
    "owning_organization_url": "/v2/organizations/60690891-baad-4660-9177-27f98ccffb08",
    "shared_organizations_url": "/v2/private_domains/6f89317d-d109-487e-92cc-a5ef6da94488/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/6f89317d-d109-487e-92cc-a5ef6da94488
X-VCAP-Request-ID: 8b30a522-b12c-49b9-b319-430838f31e64
Content-Length: 530
X-Content-Type-Options: nosniff