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.eyJ1c2VyX2lkIjoidWFhLWlkLTI5NCIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxNDB9.x4kKtvGOJKMNfZWvXHtgdnDpgWlVfcFvLJ07VAcz7zA
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/private_domains

Body

{
  "name": "exmaple.com",
  "owning_organization_guid": "133c0893-8a6f-44cc-9e68-9b17e025a213"
}

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "133c0893-8a6f-44cc-9e68-9b17e025a213"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI5NCIsImVtYWlsIjoiZW1haWwtMjM0QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxNDB9.x4kKtvGOJKMNfZWvXHtgdnDpgWlVfcFvLJ07VAcz7zA" \
	-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/7f36ebd4-c2f2-403b-bd58-dd5d7303c602
X-VCAP-Request-ID: 611505b0-5d6f-46a9-82b1-8f357ea7ca82
Content-Length: 417
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "7f36ebd4-c2f2-403b-bd58-dd5d7303c602",
    "url": "/v2/private_domains/7f36ebd4-c2f2-403b-bd58-dd5d7303c602",
    "created_at": "2015-02-12T01:42:20Z",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "133c0893-8a6f-44cc-9e68-9b17e025a213",
    "owning_organization_url": "/v2/organizations/133c0893-8a6f-44cc-9e68-9b17e025a213"
  }
}