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": "806d9f9f-6adb-45ee-8c2a-74f56aba5300"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwOCIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODZ9.xVfqSFnrpRbAt5c6BREhxELTnR-lsu8VglwaLZlGxhQ
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": "806d9f9f-6adb-45ee-8c2a-74f56aba5300"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTIwOCIsImVtYWlsIjoiZW1haWwtMTQ1QHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0NTE0MTM2ODZ9.xVfqSFnrpRbAt5c6BREhxELTnR-lsu8VglwaLZlGxhQ" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "205f148e-7882-4abd-90a6-0b208308512e",
    "url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e",
    "created_at": "2015-12-22T18:28:06Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "806d9f9f-6adb-45ee-8c2a-74f56aba5300",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/806d9f9f-6adb-45ee-8c2a-74f56aba5300",
    "spaces_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/spaces",
    "domains_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/domains",
    "private_domains_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/private_domains",
    "users_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/users",
    "managers_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/managers",
    "billing_managers_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/billing_managers",
    "auditors_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/auditors",
    "app_events_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/app_events",
    "space_quota_definitions_url": "/v2/organizations/205f148e-7882-4abd-90a6-0b208308512e/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/205f148e-7882-4abd-90a6-0b208308512e
X-VCAP-Request-ID: 
Content-Length: 1302
X-Content-Type-Options: nosniff