Home
Version 3
Domains (deprecated) API

Domains (deprecated) API

Create a Shared Domain (deprecated)

POST /v2/domains

Request

Route

POST /v2/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
wildcard Allow routes with non-empty hosts
  • true
  • false
owning_organization_guid The organization that owns the domain. If not specified, the domain is shared.
{
  "name": "example.com",
  "wildcard": true
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMjE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDV9.ksR9tSp6ijaircZKsAYenAZe9YjNQ0xV4DQQg9gK0kI
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/domains" -d '{
  "name": "example.com",
  "wildcard": true
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NiIsImVtYWlsIjoiZW1haWwtMjE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDcxMTY4NDV9.ksR9tSp6ijaircZKsAYenAZe9YjNQ0xV4DQQg9gK0kI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "e0514c72-87e7-42de-b30c-150958075f5c",
    "url": "/v2/domains/e0514c72-87e7-42de-b30c-150958075f5c",
    "created_at": "2015-11-03T00:54:05Z",
    "updated_at": null
  },
  "entity": {
    "name": "example.com",
    "owning_organization_guid": null,
    "shared_organizations": [

    ]
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/domains/e0514c72-87e7-42de-b30c-150958075f5c
X-VCAP-Request-ID: bbb6a32b-11f9-418b-bdea-da9570f22f73
X-Cf-Warnings: Endpoint+deprecated
Content-Length: 324
X-Content-Type-Options: nosniff