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": "b12469ff-f744-4b42-990d-f91d231c785c"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MyIsImVtYWlsIjoiZW1haWwtMTIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODV9.ytCE2t7ik6BxCnwrbpJpVW-YlAS8Tenadsg0CmpV9SM
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": "b12469ff-f744-4b42-990d-f91d231c785c"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE4MyIsImVtYWlsIjoiZW1haWwtMTIwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODV9.ytCE2t7ik6BxCnwrbpJpVW-YlAS8Tenadsg0CmpV9SM" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "f014abfc-2665-4587-9432-3924c732d678",
    "url": "/v2/private_domains/f014abfc-2665-4587-9432-3924c732d678",
    "created_at": "2015-12-22T18:28:05Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "b12469ff-f744-4b42-990d-f91d231c785c",
    "owning_organization_url": "/v2/organizations/b12469ff-f744-4b42-990d-f91d231c785c",
    "shared_organizations_url": "/v2/private_domains/f014abfc-2665-4587-9432-3924c732d678/shared_organizations"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/private_domains/f014abfc-2665-4587-9432-3924c732d678
X-VCAP-Request-ID: 
Content-Length: 530
X-Content-Type-Options: nosniff