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": "4de4a640-6872-4e3f-9d46-b8c2311ccc8d"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyMyIsImVtYWlsIjoiZW1haWwtMjI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDF9.G6xJoXtpP6X6Auwwny8qVErqEkRThct1Ax0ykBISaS0
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": "4de4a640-6872-4e3f-9d46-b8c2311ccc8d"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMyMyIsImVtYWlsIjoiZW1haWwtMjI2QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NDQ3ODI5NDF9.G6xJoXtpP6X6Auwwny8qVErqEkRThct1Ax0ykBISaS0" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1902cfc1-a1ab-44db-a2ae-4b0ccb727114",
    "url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114",
    "created_at": "2015-10-07T00:35:41Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "4de4a640-6872-4e3f-9d46-b8c2311ccc8d",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/4de4a640-6872-4e3f-9d46-b8c2311ccc8d",
    "spaces_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/spaces",
    "domains_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/domains",
    "private_domains_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/private_domains",
    "users_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/users",
    "managers_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/managers",
    "billing_managers_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/billing_managers",
    "auditors_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/auditors",
    "app_events_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/app_events",
    "space_quota_definitions_url": "/v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/1902cfc1-a1ab-44db-a2ae-4b0ccb727114
X-VCAP-Request-ID: 286c24f7-dd4c-4325-b094-ebd949101c78
Content-Length: 1302
X-Content-Type-Options: nosniff