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.eyJ1c2VyX2lkIjoidWFhLWlkLTM3OCIsImVtYWlsIjoiZW1haWwtMjgwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODV9.fH3_Nd9ZCLPdWIVRLo0tY6ox-f_zzQDFRkHtQ9saVuY
Host: example.org
Content-Type: application/x-www-form-urlencoded
Cookie: 

Route

POST /v2/organizations

Body

{
  "name": "my-org-name",
  "quota_definition_guid": "8faa1552-d098-4fe5-b140-c8cc7105a5dd"
}

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "8faa1552-d098-4fe5-b140-c8cc7105a5dd"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTM3OCIsImVtYWlsIjoiZW1haWwtMjgwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjI5OTA4ODV9.fH3_Nd9ZCLPdWIVRLo0tY6ox-f_zzQDFRkHtQ9saVuY" \
	-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/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0
X-VCAP-Request-ID: 4e7155ad-7c73-471c-ba2f-a23042e8d685
Content-Length: 1302
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0",
    "url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0",
    "created_at": "2015-01-27T19:14:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "8faa1552-d098-4fe5-b140-c8cc7105a5dd",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/8faa1552-d098-4fe5-b140-c8cc7105a5dd",
    "spaces_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/spaces",
    "domains_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/domains",
    "private_domains_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/private_domains",
    "users_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/users",
    "managers_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/managers",
    "billing_managers_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/billing_managers",
    "auditors_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/auditors",
    "app_events_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/app_events",
    "space_quota_definitions_url": "/v2/organizations/be9cb9eb-ee08-44c2-8c5b-a9d4dd5713a0/space_quota_definitions"
  }
}