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

Route

POST /v2/organizations

Body

{
  "name": "my-org-name",
  "quota_definition_guid": "d27af265-f965-4600-a8b4-53d4b6fc0b4a"
}

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "d27af265-f965-4600-a8b4-53d4b6fc0b4a"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTEzNiIsImVtYWlsIjoiZW1haWwtMTA5QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTc0NjIzNTh9.kyzOsCeOh6a_A2ifvfQuCWFvYfO2PAcHs2RRbf1mcAY" \
	-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/daf68fc5-33df-4f58-bce8-c2040f3fd035
X-VCAP-Request-ID: 55226be1-e642-4ffe-9f83-a246d21fb36e
Content-Length: 1307
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "daf68fc5-33df-4f58-bce8-c2040f3fd035",
    "url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035",
    "created_at": "2014-11-24T19:32:38+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "d27af265-f965-4600-a8b4-53d4b6fc0b4a",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/d27af265-f965-4600-a8b4-53d4b6fc0b4a",
    "spaces_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/spaces",
    "domains_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/domains",
    "private_domains_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/private_domains",
    "users_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/users",
    "managers_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/managers",
    "billing_managers_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/billing_managers",
    "auditors_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/auditors",
    "app_events_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/app_events",
    "space_quota_definitions_url": "/v2/organizations/daf68fc5-33df-4f58-bce8-c2040f3fd035/space_quota_definitions"
  }
}