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": "4b09d17a-0b48-4c6c-a95c-26c0f3dfbd9c"
}

Headers

Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg3IiwiZW1haWwiOiJlbWFpbC02NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTgyfQ.p_zO7xV7BNjPAC1So2Ix2lmZo6Hp30-DeAQfeXww-cc
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": "4b09d17a-0b48-4c6c-a95c-26c0f3dfbd9c"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTg3IiwiZW1haWwiOiJlbWFpbC02NkBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDMyNzc0OTgyfQ.p_zO7xV7BNjPAC1So2Ix2lmZo6Hp30-DeAQfeXww-cc" \
	-H "Host: example.org" \
	-H "Content-Type: application/x-www-form-urlencoded" \
	-H "Cookie: "

Response

Status

201 Created

Body

{
  "metadata": {
    "guid": "6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d",
    "url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d",
    "created_at": "2015-05-21T01:03:02Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "4b09d17a-0b48-4c6c-a95c-26c0f3dfbd9c",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/4b09d17a-0b48-4c6c-a95c-26c0f3dfbd9c",
    "spaces_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/spaces",
    "domains_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/domains",
    "private_domains_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/private_domains",
    "users_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/users",
    "managers_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/managers",
    "billing_managers_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/billing_managers",
    "auditors_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/auditors",
    "app_events_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/app_events",
    "space_quota_definitions_url": "/v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d/space_quota_definitions"
  }
}

Headers

Content-Type: application/json;charset=utf-8
Location: /v2/organizations/6d154fdc-76f7-48ab-b1c5-1e62cdbf2f6d
X-VCAP-Request-ID: c91d91fa-df4e-417d-a934-458b44293fd6
Content-Length: 1302
X-Content-Type-Options: nosniff