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

Route

POST /v2/private_domains

Body

{
  "name": "exmaple.com",
  "owning_organization_guid": "c1e33b50-dfd4-4c47-bb1f-e454b59550fb"
}

cURL

curl "https://api.[your-domain.com]/v2/private_domains" -d '{
  "name": "exmaple.com",
  "owning_organization_guid": "c1e33b50-dfd4-4c47-bb1f-e454b59550fb"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyMCIsImVtYWlsIjoiZW1haWwtMjQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNzJ9.MW_xJMbIoIHS4fv3qstKMzYx137GFEccbwVspgFD_Gc" \
	-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/a2bbbf02-ae99-4422-819c-951b531fcd0a
X-VCAP-Request-ID: 7f2210c6-c7a2-438a-a6c5-041e4931f15d
Content-Length: 422
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "a2bbbf02-ae99-4422-819c-951b531fcd0a",
    "url": "/v2/private_domains/a2bbbf02-ae99-4422-819c-951b531fcd0a",
    "created_at": "2014-11-24T19:32:52+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "exmaple.com",
    "owning_organization_guid": "c1e33b50-dfd4-4c47-bb1f-e454b59550fb",
    "owning_organization_url": "/v2/organizations/c1e33b50-dfd4-4c47-bb1f-e454b59550fb"
  }
}