Home
Version 3
Shared Domains API

Shared Domains API

Create a Shared Domain

POST /v2/shared_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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMjAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NTB9.wh0Awj9ZDCX-izVtdtMachStDQmBHcjnx5_x7tMLVsI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/shared_domains

Body

{
  "name": "example.com"
}

cURL

curl "https://api.[your-domain.com]/v2/shared_domains" -d '{
  "name": "example.com"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI2MSIsImVtYWlsIjoiZW1haWwtMjAxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjIzMjM1NTB9.wh0Awj9ZDCX-izVtdtMachStDQmBHcjnx5_x7tMLVsI" \
	-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/shared_domains/2d213774-1a96-42ef-a7c5-1470a3ed6695
X-VCAP-Request-ID: fe374d8d-bd36-4c7e-91ad-19d822bf9c87
Content-Length: 260
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "2d213774-1a96-42ef-a7c5-1470a3ed6695",
    "url": "/v2/shared_domains/2d213774-1a96-42ef-a7c5-1470a3ed6695",
    "created_at": "2015-01-20T01:52:30+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "example.com"
  }
}