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": "a80fb93c-5138-4af6-96a0-e03b3b34023e"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTYyIiwiZW1haWwiOiJlbWFpbC02MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM5NDI2MTk2fQ.QiQ3VF2qUL1slNjYFJe8f3YAT8ZmGhn4gT-9xyiv1tY
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": "a80fb93c-5138-4af6-96a0-e03b3b34023e"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTYyIiwiZW1haWwiOiJlbWFpbC02MkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDM5NDI2MTk2fQ.QiQ3VF2qUL1slNjYFJe8f3YAT8ZmGhn4gT-9xyiv1tY" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "d0ea8465-0321-4857-91f4-ba48f958c1ba",
    "url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba",
    "created_at": "2015-08-06T00:36:36Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "a80fb93c-5138-4af6-96a0-e03b3b34023e",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/a80fb93c-5138-4af6-96a0-e03b3b34023e",
    "spaces_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/spaces",
    "domains_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/domains",
    "private_domains_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/private_domains",
    "users_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/users",
    "managers_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/managers",
    "billing_managers_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/billing_managers",
    "auditors_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/auditors",
    "app_events_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/app_events",
    "space_quota_definitions_url": "/v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/d0ea8465-0321-4857-91f4-ba48f958c1ba
X-VCAP-Request-ID: 9b37c81c-f2de-46e1-8eea-10fc44feb649
Content-Length: 1302
X-Content-Type-Options: nosniff