Home
Version 3
Domains (deprecated) API

Domains (deprecated) API

creates a shared domain (deprecated)

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

Request

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNyIsImVtYWlsIjoiZW1haWwtOTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDQ3MTY5MX0.cKs4PLZsciMCmF_aUm4gZiABNriNuDQhSnf-Ut7GIW4
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/domains

Body

{
  "name": "example.com",
  "wildcard": true
}

cURL

curl "https://api.[your-domain.com]/v2/domains" -d '{
  "name": "example.com",
  "wildcard": true
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNyIsImVtYWlsIjoiZW1haWwtOTlAc29tZWRvbWFpbi5jb20iLCJzY29wZSI6WyJjbG91ZF9jb250cm9sbGVyLmFkbWluIl0sImF1ZCI6WyJjbG91ZF9jb250cm9sbGVyIl0sImV4cCI6MTQyNDQ3MTY5MX0.cKs4PLZsciMCmF_aUm4gZiABNriNuDQhSnf-Ut7GIW4" \
	-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/domains/a361cb27-fcac-478a-a166-00c38d4f5600
X-VCAP-Request-ID: efe64598-5628-4a1c-9939-b44c69e109a9
X-Cf-Warnings: Endpoint+deprecated
Content-Length: 286
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "a361cb27-fcac-478a-a166-00c38d4f5600",
    "url": "/v2/domains/a361cb27-fcac-478a-a166-00c38d4f5600",
    "created_at": "2015-02-13T22:34:51Z",
    "updated_at": null
  },
  "entity": {
    "name": "example.com",
    "owning_organization_guid": null
  }
}