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.eyJ1c2VyX2lkIjoidWFhLWlkLTE2IiwiZW1haWwiOiJlbWFpbC0xNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjM1fQ.haIgm8x5T6mM4jrW5rhgso7Em10Tj0hmKHXvqTFHaXI
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.eyJ1c2VyX2lkIjoidWFhLWlkLTE2IiwiZW1haWwiOiJlbWFpbC0xNkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjM1fQ.haIgm8x5T6mM4jrW5rhgso7Em10Tj0hmKHXvqTFHaXI" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "69199aa8-2867-4563-b3f5-d3339304d704",
    "url": "/v2/domains/69199aa8-2867-4563-b3f5-d3339304d704",
    "created_at": "2016-04-06T00:17:15Z",
    "updated_at": null
  },
  "entity": {
    "name": "example.com",
    "owning_organization_guid": null,
    "shared_organizations": [

    ]
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/domains/69199aa8-2867-4563-b3f5-d3339304d704
X-VCAP-Request-ID: 
X-Cf-Warnings: Endpoint+deprecated
Content-Length: 324
X-Content-Type-Options: nosniff