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

Route

POST /v2/organizations

Body

{
  "name": "my-org-name",
  "quota_definition_guid": "45c688fb-1a55-4909-ab32-6dd9f7c90f6e"
}

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "45c688fb-1a55-4909-ab32-6dd9f7c90f6e"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwNiIsImVtYWlsIjoiZW1haWwtMTUwQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTU3NTQxNDF9.NESJcxlFnbKJvzH1ru_TqpMLkoDMp77QH2QsaeSbtJA" \
	-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/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2
X-VCAP-Request-ID: 0939224f-e7a3-4fc8-8d92-16f1ca342f93
Content-Length: 1307
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2",
    "url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2",
    "created_at": "2014-11-05T01:02:21+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "45c688fb-1a55-4909-ab32-6dd9f7c90f6e",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/45c688fb-1a55-4909-ab32-6dd9f7c90f6e",
    "spaces_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/spaces",
    "domains_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/domains",
    "private_domains_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/private_domains",
    "users_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/users",
    "managers_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/managers",
    "billing_managers_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/billing_managers",
    "auditors_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/auditors",
    "app_events_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/app_events",
    "space_quota_definitions_url": "/v2/organizations/6b960bb5-c90b-4e1f-89c1-70ea2fa9adc2/space_quota_definitions"
  }
}