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": "f9ce8709-d3aa-4660-89f6-382929dd226a"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MyIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDV9.HwVxsltM94Kjl2mveEAv5SZfsSKCqc6dQ2qKTEBEnFo
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": "f9ce8709-d3aa-4660-89f6-382929dd226a"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI1MyIsImVtYWlsIjoiZW1haWwtMjEzQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTg1OTk0NDV9.HwVxsltM94Kjl2mveEAv5SZfsSKCqc6dQ2qKTEBEnFo" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "eeb5ae90-0fe7-47da-8b40-04ff75cd912b",
    "url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b",
    "created_at": "2016-03-14T22:30:45Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "f9ce8709-d3aa-4660-89f6-382929dd226a",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/f9ce8709-d3aa-4660-89f6-382929dd226a",
    "spaces_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/spaces",
    "domains_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/domains",
    "private_domains_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/private_domains",
    "users_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/users",
    "managers_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/managers",
    "billing_managers_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/billing_managers",
    "auditors_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/auditors",
    "app_events_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/app_events",
    "space_quota_definitions_url": "/v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/eeb5ae90-0fe7-47da-8b40-04ff75cd912b
X-VCAP-Request-ID: 
Content-Length: 1302
X-Content-Type-Options: nosniff