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

Route

POST /v2/organizations

Body

{
  "name": "my-org-name",
  "quota_definition_guid": "e1680c7a-b515-49bb-a019-0ca26137978f"
}

cURL

curl "https://api.[your-domain.com]/v2/organizations" -d '{
  "name": "my-org-name",
  "quota_definition_guid": "e1680c7a-b515-49bb-a019-0ca26137978f"
}' -X POST \
	-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMwMiIsImVtYWlsIjoiZW1haWwtMjQyQHNvbWVkb21haW4uY29tIiwic2NvcGUiOlsiY2xvdWRfY29udHJvbGxlci5hZG1pbiJdLCJhdWQiOlsiY2xvdWRfY29udHJvbGxlciJdLCJleHAiOjE0MjQzMTAxNDF9.HEl9uFUvZn3RYHm5OtLfRtpUwIEuBh2VjwvyDH3GV2w" \
	-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/0395b43c-8992-4164-9c18-0d65675857f4
X-VCAP-Request-ID: cd79d4f9-fc56-4367-9d9f-5fded38573f1
Content-Length: 1302
X-Content-Type-Options: nosniff

Status

201 Created

Body

{
  "metadata": {
    "guid": "0395b43c-8992-4164-9c18-0d65675857f4",
    "url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4",
    "created_at": "2015-02-12T01:42:21Z",
    "updated_at": null
  },
  "entity": {
    "name": "my-org-name",
    "billing_enabled": false,
    "quota_definition_guid": "e1680c7a-b515-49bb-a019-0ca26137978f",
    "status": "active",
    "quota_definition_url": "/v2/quota_definitions/e1680c7a-b515-49bb-a019-0ca26137978f",
    "spaces_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/spaces",
    "domains_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/domains",
    "private_domains_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/private_domains",
    "users_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/users",
    "managers_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/managers",
    "billing_managers_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/billing_managers",
    "auditors_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/auditors",
    "app_events_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/app_events",
    "space_quota_definitions_url": "/v2/organizations/0395b43c-8992-4164-9c18-0d65675857f4/space_quota_definitions"
  }
}