Home
Version 3
Organizations API

Organizations API

Creating an Organization

POST /v2/organizations/

Request

Route

POST /v2/organizations

Body

Name Description Default Valid Values Example Values
name The name of the organization
  • my-org-name
status Status of the organization
quota_definition_guid The guid of quota to associate with this organization
  • org-quota-def-guid
billing_enabled If billing is enabled for this organization
{
  "name": "my-org-name",
  "quota_definition_guid": "ed225cba-9748-4b00-8d24-d7abcce39522"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjM5fQ.s5ZGwhIxBeLAWs-OECiO32g40E-tOD9ylDW1eCzrOSk
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "ed225cba-9748-4b00-8d24-d7abcce39522"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTQ2IiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYwNTA2NjM5fQ.s5ZGwhIxBeLAWs-OECiO32g40E-tOD9ylDW1eCzrOSk" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "5c9ccb8d-b340-4ee6-9eb5-5a1216835e63",
    "url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63",
    "created_at": "2016-04-06T00:17:19Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "ed225cba-9748-4b00-8d24-d7abcce39522",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/ed225cba-9748-4b00-8d24-d7abcce39522",
    "spaces_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/spaces",
    "domains_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/domains",
    "private_domains_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/private_domains",
    "users_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/users",
    "managers_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/managers",
    "billing_managers_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/billing_managers",
    "auditors_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/auditors",
    "app_events_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/app_events",
    "space_quota_definitions_url": "/v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/5c9ccb8d-b340-4ee6-9eb5-5a1216835e63
X-VCAP-Request-ID: 
Content-Length: 1302
X-Content-Type-Options: nosniff