Home
Version 3
Organizations API

Organizations API

Creating an Organization

POST /v2/organizations/

Fields

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

Request

Headers

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

Route

POST /v2/organizations

Body

{
  "name": "my-org-name",
  "quota_definition_guid": "803808d6-e2dd-44d0-84d9-8a8a21ad6519"
}

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "803808d6-e2dd-44d0-84d9-8a8a21ad6519"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzIiwiZW1haWwiOiJlbWFpbC0xM0Bzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDI0NDcxNjg1fQ.aRXJwDhafl8kiAsXfhS5jwimtpO6fKOmLYIAcAuySo4" \
	-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/organizations/4599a40c-0138-4979-a957-c2eb6de6c261
X-VCAP-Request-ID: 30321a3e-e844-4790-9afe-b5f3dc5047fe
Content-Length: 1302
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "4599a40c-0138-4979-a957-c2eb6de6c261",
    "url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261",
    "created_at": "2015-02-13T22:34:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "803808d6-e2dd-44d0-84d9-8a8a21ad6519",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/803808d6-e2dd-44d0-84d9-8a8a21ad6519",
    "spaces_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/spaces",
    "domains_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/domains",
    "private_domains_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/private_domains",
    "users_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/users",
    "managers_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/managers",
    "billing_managers_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/billing_managers",
    "auditors_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/auditors",
    "app_events_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/app_events",
    "space_quota_definitions_url": "/v2/organizations/4599a40c-0138-4979-a957-c2eb6de6c261/space_quota_definitions"
  }
}