Groups

Groups of users inside an organization.

6 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors

List the groups

GET /api/v1/account/organizations/{id}/groups
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>
  • member_count integer
  • name 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}/groups' \
  -H 'Authorization: Bearer <badge>'

Response 200

[
  {
    "created_at": "2026-01-01T00:00:00Z",
    "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
    "member_count": 0,
    "name": "string"
  }
]

Create a group

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

Path parameters

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

Request body application/json required

  • name string required

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • member_count integer
  • name 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 POST 'https://pcp.example.com/api/v1/account/organizations/{id}/groups' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'

Response 200

{
  "created_at": "2026-01-01T00:00:00Z",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "member_count": 0,
  "name": "string"
}

Get a group

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

Path parameters

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

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • members array[object]
    • email string
    • is_service boolean
    • name string
    • user_id string<uuid>
  • name 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}/groups/{group_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "created_at": "2026-01-01T00:00:00Z",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "members": [
    {
      "email": "string",
      "is_service": true,
      "name": "string",
      "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
    }
  ],
  "name": "string"
}

Delete a group

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

Path parameters

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

Response 200 OK

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}/groups/{group_id}' \
  -H 'Authorization: Bearer <badge>'

Add a member to a group

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

Path parameters

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

Request body application/json required

  • user_id string<uuid>

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • members array[object]
    • email string
    • is_service boolean
    • name string
    • user_id string<uuid>
  • name 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 POST 'https://pcp.example.com/api/v1/account/organizations/{id}/groups/{group_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",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "members": [
    {
      "email": "string",
      "is_service": true,
      "name": "string",
      "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
    }
  ],
  "name": "string"
}

Remove a member from a group

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

Path parameters

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

Response 200 OK application/json

  • created_at string<date-time>
  • id string<uuid>
  • members array[object]
    • email string
    • is_service boolean
    • name string
    • user_id string<uuid>
  • name 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 DELETE 'https://pcp.example.com/api/v1/account/organizations/{id}/groups/{group_id}/members/{user_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "created_at": "2026-01-01T00:00:00Z",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "members": [
    {
      "email": "string",
      "is_service": true,
      "name": "string",
      "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
    }
  ],
  "name": "string"
}