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
|
|
|
|
status
|
Status of the organization
|
|
|
|
quota_definition_guid
|
The guid of quota to associate with this organization
|
|
|
|
billing_enabled
|
If billing is enabled for this organization
|
|
|
|
{
"name": "my-org-name",
"quota_definition_guid": "c1f43e3f-1a2d-428c-ae1c-4d24f9e5c02a"
}
Headers
cURL
curl "https://api.[your-domain.com]/v2/organizations" -d '{
"name": "my-org-name",
"quota_definition_guid": "c1f43e3f-1a2d-428c-ae1c-4d24f9e5c02a"
}' -X POST \
-H "Authorization: bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidWFhLWlkLTMxIiwiZW1haWwiOiJlbWFpbC0zMUBzb21lZG9tYWluLmNvbSIsInNjb3BlIjpbImNsb3VkX2NvbnRyb2xsZXIuYWRtaW4iXSwiYXVkIjpbImNsb3VkX2NvbnRyb2xsZXIiXSwiZXhwIjoxNDYzNjE4NzA1fQ.nS96dCOGZ9DcyGNwa69o649Q0ZofpWc1VYoQSnUEs9c" \
-H "Host: example.org" \
-H "Content-Type: application/x-www-form-urlencoded" \
-H "Cookie: "
Response
Status
201 Created
Body
{
"metadata": {
"guid": "3cb5e681-ab86-45da-8e45-63ab146099ce",
"url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce",
"created_at": "2016-05-12T00:45:04Z",
"updated_at": null
},
"entity": {
"name": "my-org-name",
"billing_enabled": false,
"quota_definition_guid": "c1f43e3f-1a2d-428c-ae1c-4d24f9e5c02a",
"status": "active",
"quota_definition_url": "/v2/quota_definitions/c1f43e3f-1a2d-428c-ae1c-4d24f9e5c02a",
"spaces_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/spaces",
"domains_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/domains",
"private_domains_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/private_domains",
"users_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/users",
"managers_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/managers",
"billing_managers_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/billing_managers",
"auditors_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/auditors",
"app_events_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/app_events",
"space_quota_definitions_url": "/v2/organizations/3cb5e681-ab86-45da-8e45-63ab146099ce/space_quota_definitions"
}
}
Headers