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": "0cc75b59-e4f9-4709-9054-095c168c1616"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OSIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDR9.OnuzhIlt0Sm2IQl9qizarScnrYMPmswU0Wf2B54oci8
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": "0cc75b59-e4f9-4709-9054-095c168c1616"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTE2OSIsImVtYWlsIjoiZW1haWwtMTIxQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjYxODc3NDR9.OnuzhIlt0Sm2IQl9qizarScnrYMPmswU0Wf2B54oci8" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "1bd4abac-013a-4c99-a18d-65b1f5c0b547",
    "url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547",
    "created_at": "2015-03-05T19:15:44Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "0cc75b59-e4f9-4709-9054-095c168c1616",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/0cc75b59-e4f9-4709-9054-095c168c1616",
    "spaces_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/spaces",
    "domains_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/domains",
    "private_domains_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/private_domains",
    "users_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/users",
    "managers_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/managers",
    "billing_managers_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/billing_managers",
    "auditors_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/auditors",
    "app_events_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/app_events",
    "space_quota_definitions_url": "/v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/1bd4abac-013a-4c99-a18d-65b1f5c0b547
X-VCAP-Request-ID: c0417598-228f-4ba7-ad7a-f324d58d464a
Content-Length: 1302
X-Content-Type-Options: nosniff