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

Route

POST /v2/organizations

Body

{
  "name": "my-org-name",
  "quota_definition_guid": "47e5f2fd-3ade-44a1-a544-06f75fa39e74"
}

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "47e5f2fd-3ade-44a1-a544-06f75fa39e74"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTI4NSIsImVtYWlsIjoiZW1haWwtMjE3QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MTk5ODk5NzZ9.ogJqkwxQCCGb9GrcgYk7tBwH14Ikov99afDZsoMDT44" \
	-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/0110ffb5-8fae-4574-a5d6-333f18674247
X-VCAP-Request-ID: 60af2063-99e0-4d96-9d8c-59e696b13e1b
Content-Length: 1307
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "0110ffb5-8fae-4574-a5d6-333f18674247",
    "url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247",
    "created_at": "2014-12-24T01:39:36+00:00",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "47e5f2fd-3ade-44a1-a544-06f75fa39e74",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/47e5f2fd-3ade-44a1-a544-06f75fa39e74",
    "spaces_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/spaces",
    "domains_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/domains",
    "private_domains_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/private_domains",
    "users_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/users",
    "managers_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/managers",
    "billing_managers_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/billing_managers",
    "auditors_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/auditors",
    "app_events_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/app_events",
    "space_quota_definitions_url": "/v2/organizations/0110ffb5-8fae-4574-a5d6-333f18674247/space_quota_definitions"
  }
}