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

GET /api/v1/account/organizations
Badge

Query parameters

  • type string
    Only organizations of this type.
  • full boolean
    Return the whole organization tree.
    Default: false

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • info map[string]
  • name string
  • parent_id string<uuid>
  • revision integer
  • type string
  • updated_at string<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

POST /api/v1/account/organizations
Badge

Request body application/json required

  • info map[string]
  • name string required
  • parent_id string<uuid>
  • type string required

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • info map[string]
  • name string
  • parent_id string<uuid>
  • revision integer
  • type string
  • updated_at string<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

GET /api/v1/account/organizations/{id}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • info map[string]
  • name string
  • parent_id string<uuid>
  • revision integer
  • type string
  • updated_at string<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

DELETE /api/v1/account/organizations/{id}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • deleted_at string<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

GET /api/v1/account/organizations/{id}/capabilities
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • classes map[array[string]]
  • organization_id string<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

GET /api/v1/account/organizations/{id}/children
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • info map[string]
  • name string
  • parent_id string<uuid>
  • revision integer
  • type string
  • updated_at string<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

GET /api/v1/account/organizations/{id}/members
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Query parameters

  • offset integer
    Number of items to skip.
    Default: 0
  • limit integer
    Maximum number of items to return.
    Default: 100 Min: 1 Max: 100
  • search string
    Free-text search on members.
  • is_service boolean
    Only service accounts, or only people.

Response 200 OK application/json

  • items array[object]
    • account string
    • created_at string<date-time>
    • email string
    • is_service boolean
    • name string
    • user_id string<uuid>
  • total integer

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

POST /api/v1/account/organizations/{id}/members
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Request body application/json required

  • user_id string<uuid>

Response 200 OK application/json

  • created_at string<date-time>
  • email string
  • is_service boolean
  • name string
  • user_id string<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

PUT /api/v1/account/organizations/{id}/members/{user_id}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • user_id string required

Request body application/json required

  • role string required

Response 200 OK application/json

  • updated_at string<date-time>
  • user_id string<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

DELETE /api/v1/account/organizations/{id}/members/{user_id}
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • user_id string required

Response 200 OK application/json

  • user_id string<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

DELETE /api/v1/account/organizations/{id}/members/{user_id}/2fa
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • user_id string 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

GET /api/v1/account/organizations/{id}/quota
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Response 200 OK application/json

  • organization_id string<uuid>
  • processed object
    • hard integer<int64> nullable
    • soft integer<int64> nullable
    • state string
    • used integer<int64>
  • stored object
    • hard integer<int64> nullable
    • soft integer<int64> nullable
    • state string
    • used integer<int64>
  • window string

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

PUT /api/v1/account/organizations/{id}/quota
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.

Request body application/json required

  • processed_hard integer<int64> nullable
  • processed_soft integer<int64> nullable
  • stored_hard integer<int64> nullable
  • stored_soft integer<int64> nullable
  • window string nullable

Response 200 OK application/json

  • organization_id string<uuid>
  • processed object
    • hard integer<int64> nullable
    • soft integer<int64> nullable
    • state string
    • used integer<int64>
  • stored object
    • hard integer<int64> nullable
    • soft integer<int64> nullable
    • state string
    • used integer<int64>
  • window string

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"
}