Organizations
Organizations, their members and quotas.
13 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors
List the organizations of the calling user
/api/v1/account/organizations
Query parameters
-
typestringOnly organizations of this type. -
fullbooleanReturn the whole organization tree.Default: false
Response 200 OK application/json
-
created_atstring<date-time> -
idstring<uuid> -
infomap[string] -
namestring -
parent_idstring<uuid> -
revisioninteger -
typestring -
updated_atstring<date-time>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/account/organizations' \
-H 'Authorization: Bearer <badge>'Response 200
[
{
"created_at": "2026-01-01T00:00:00Z",
"id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"info": {
"key": "string"
},
"name": "string",
"parent_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"revision": 0,
"type": "string",
"updated_at": "2026-01-01T00:00:00Z"
}
]Create an organization
/api/v1/account/organizations
Request body application/json required
-
infomap[string] -
namestring required -
parent_idstring<uuid> -
typestring required
Response 200 OK application/json
-
created_atstring<date-time> -
idstring<uuid> -
infomap[string] -
namestring -
parent_idstring<uuid> -
revisioninteger -
typestring -
updated_atstring<date-time>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X POST 'https://pcp.example.com/api/v1/account/organizations' \
-H 'Authorization: Bearer <badge>' \
-H 'Content-Type: application/json' \
-d '{
"info": {
"key": "string"
},
"name": "string",
"parent_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"type": "string"
}'Response 200
{
"created_at": "2026-01-01T00:00:00Z",
"id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"info": {
"key": "string"
},
"name": "string",
"parent_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"revision": 0,
"type": "string",
"updated_at": "2026-01-01T00:00:00Z"
}Get an organization
/api/v1/account/organizations/{id}
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Response 200 OK application/json
-
created_atstring<date-time> -
idstring<uuid> -
infomap[string] -
namestring -
parent_idstring<uuid> -
revisioninteger -
typestring -
updated_atstring<date-time>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/account/organizations/{id}' \
-H 'Authorization: Bearer <badge>'Response 200
{
"created_at": "2026-01-01T00:00:00Z",
"id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"info": {
"key": "string"
},
"name": "string",
"parent_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"revision": 0,
"type": "string",
"updated_at": "2026-01-01T00:00:00Z"
}Delete an organization
/api/v1/account/organizations/{id}
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Response 200 OK application/json
-
deleted_atstring<date-time>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}' \
-H 'Authorization: Bearer <badge>'Response 200
{
"deleted_at": "2026-01-01T00:00:00Z"
}List what the caller may do, class by class
/api/v1/account/organizations/{id}/capabilities
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Response 200 OK application/json
-
classesmap[array[string]] -
organization_idstring<uuid>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/account/organizations/{id}/capabilities' \
-H 'Authorization: Bearer <badge>'Response 200
{
"classes": {
"key": [
"string"
]
},
"organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}List the child organizations
/api/v1/account/organizations/{id}/children
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Response 200 OK application/json
-
created_atstring<date-time> -
idstring<uuid> -
infomap[string] -
namestring -
parent_idstring<uuid> -
revisioninteger -
typestring -
updated_atstring<date-time>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/account/organizations/{id}/children' \
-H 'Authorization: Bearer <badge>'Response 200
[
{
"created_at": "2026-01-01T00:00:00Z",
"id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"info": {
"key": "string"
},
"name": "string",
"parent_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"revision": 0,
"type": "string",
"updated_at": "2026-01-01T00:00:00Z"
}
]List the members
/api/v1/account/organizations/{id}/members
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Query parameters
-
offsetintegerNumber of items to skip.Default: 0 -
limitintegerMaximum number of items to return.Default: 100 Min: 1 Max: 100 -
searchstringFree-text search on members. -
is_servicebooleanOnly service accounts, or only people.
Response 200 OK application/json
-
itemsarray[object]-
accountstring -
created_atstring<date-time> -
emailstring -
is_serviceboolean -
namestring -
user_idstring<uuid>
-
-
totalinteger
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/account/organizations/{id}/members' \
-H 'Authorization: Bearer <badge>'Response 200
{
"items": [
{
"account": "string",
"created_at": "2026-01-01T00:00:00Z",
"email": "string",
"is_service": true,
"name": "string",
"user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}
],
"total": 0
}Add a member
/api/v1/account/organizations/{id}/members
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Request body application/json required
-
user_idstring<uuid>
Response 200 OK application/json
-
created_atstring<date-time> -
emailstring -
is_serviceboolean -
namestring -
user_idstring<uuid>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X POST 'https://pcp.example.com/api/v1/account/organizations/{id}/members' \
-H 'Authorization: Bearer <badge>' \
-H 'Content-Type: application/json' \
-d '{
"user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}'Response 200
{
"created_at": "2026-01-01T00:00:00Z",
"email": "string",
"is_service": true,
"name": "string",
"user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}Change the role of a member
/api/v1/account/organizations/{id}/members/{user_id}
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s. -
user_idstring required
Request body application/json required
-
rolestring required
Response 200 OK application/json
-
updated_atstring<date-time> -
user_idstring<uuid>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X PUT 'https://pcp.example.com/api/v1/account/organizations/{id}/members/{user_id}' \
-H 'Authorization: Bearer <badge>' \
-H 'Content-Type: application/json' \
-d '{
"role": "string"
}'Response 200
{
"updated_at": "2026-01-01T00:00:00Z",
"user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}Remove a member
/api/v1/account/organizations/{id}/members/{user_id}
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s. -
user_idstring required
Response 200 OK application/json
-
user_idstring<uuid>
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/members/{user_id}' \
-H 'Authorization: Bearer <badge>'Response 200
{
"user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}Reset the second factors of a member
/api/v1/account/organizations/{id}/members/{user_id}/2fa
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s. -
user_idstring required
Response 204 No Content
No response body.
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/members/{user_id}/2fa' \
-H 'Authorization: Bearer <badge>'Get the organization quota
/api/v1/account/organizations/{id}/quota
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Response 200 OK application/json
-
organization_idstring<uuid> -
processedobject-
hardinteger<int64> nullable -
softinteger<int64> nullable -
statestring -
usedinteger<int64>
-
-
storedobject-
hardinteger<int64> nullable -
softinteger<int64> nullable -
statestring -
usedinteger<int64>
-
-
windowstring
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl 'https://pcp.example.com/api/v1/account/organizations/{id}/quota' \
-H 'Authorization: Bearer <badge>'Response 200
{
"organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"processed": {
"hard": 0,
"soft": 0,
"state": "string",
"used": 0
},
"stored": {
"hard": 0,
"soft": 0,
"state": "string",
"used": 0
},
"window": "string"
}Set the organization quota
/api/v1/account/organizations/{id}/quota
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Request body application/json required
-
processed_hardinteger<int64> nullable -
processed_softinteger<int64> nullable -
stored_hardinteger<int64> nullable -
stored_softinteger<int64> nullable -
windowstring nullable
Response 200 OK application/json
-
organization_idstring<uuid> -
processedobject-
hardinteger<int64> nullable -
softinteger<int64> nullable -
statestring -
usedinteger<int64>
-
-
storedobject-
hardinteger<int64> nullable -
softinteger<int64> nullable -
statestring -
usedinteger<int64>
-
-
windowstring
Errors
- 400 Bad Request (validation or deserialization error)
- 401 Missing, invalid or expired credentials
- 403 The caller may not do this
- 500 Internal Server Error (panics)
Every error returns the standard error body.
Request
curl -X PUT 'https://pcp.example.com/api/v1/account/organizations/{id}/quota' \
-H 'Authorization: Bearer <badge>' \
-H 'Content-Type: application/json' \
-d '{
"processed_hard": 0,
"processed_soft": 0,
"stored_hard": 0,
"stored_soft": 0,
"window": "string"
}'Response 200
{
"organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
"processed": {
"hard": 0,
"soft": 0,
"state": "string",
"used": 0
},
"stored": {
"hard": 0,
"soft": 0,
"state": "string",
"used": 0
},
"window": "string"
}