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": "b931d0a8-82cc-46ce-9798-598b9f352f25"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc4IiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk4fQ.eUx4oU5Iupr5kG9RU8roMc9UfiltDfypaDGLxMHCvJQ
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": "b931d0a8-82cc-46ce-9798-598b9f352f25"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTc4IiwiZW1haWwiOiJlbWFpbC00NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDQ1MzYyMjk4fQ.eUx4oU5Iupr5kG9RU8roMc9UfiltDfypaDGLxMHCvJQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "c52d34f9-14a1-4b74-8f9e-dec121ac189a",
    "url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a",
    "created_at": "2015-10-13T17:31:38Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "b931d0a8-82cc-46ce-9798-598b9f352f25",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/b931d0a8-82cc-46ce-9798-598b9f352f25",
    "spaces_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/spaces",
    "domains_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/domains",
    "private_domains_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/private_domains",
    "users_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/users",
    "managers_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/managers",
    "billing_managers_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/billing_managers",
    "auditors_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/auditors",
    "app_events_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/app_events",
    "space_quota_definitions_url": "/v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/c52d34f9-14a1-4b74-8f9e-dec121ac189a
X-VCAP-Request-ID: d8fa9709-82cd-4926-b58e-24e19cbb13af
Content-Length: 1302
X-Content-Type-Options: nosniff