Home
Version 3
Shared Domains API

Shared Domains API

Create a Shared Domain

POST /v2/shared_domains

Request

Route

POST /v2/shared_domains

Body

Name Description Default Valid Values Example Values
guid The guid of the domain.
name The name of the domain.
  • example.com
  • foo.example.com
{
  "name": "example.com"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MyIsImVtYWlsIjoiZW1haWwtMTgxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzh9.D7u3TgKvusVZQ8Uux466Ry4v-XyevUKUBC8UBvFx8ro
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/shared_domains" -d '{
  "name": "example.com"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MyIsImVtYWlsIjoiZW1haWwtMTgxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MzE2NDY2Mzh9.D7u3TgKvusVZQ8Uux466Ry4v-XyevUKUBC8UBvFx8ro" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "7b71a46f-97c4-4c2c-b995-c9f1e1ac69db",
    "url": "/v2/shared_domains/7b71a46f-97c4-4c2c-b995-c9f1e1ac69db",
    "created_at": "2015-05-07T23:37:18Z",
    "updated_at": null
  },
  "entity": {
    "name": "example.com"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/shared_domains/7b71a46f-97c4-4c2c-b995-c9f1e1ac69db
X-VCAP-Request-ID: 98dd863b-1138-4666-acd1-975ef203e7c5
Content-Length: 255
X-Content-Type-Options: nosniff