Adding Users to User Groups

Prerequisites

  • Permission: data:user_group:manage for the target group

  • Users must exist in the system

API Endpoint

POST /groups/members?identifier={group_identifier}

Request Body

{
  "principals": [
    "123e4567-e89b-12d3-a456-426614174000",
    "987fcdeb-51a2-43d7-8901-234567890abc"
  ]
}

Fields:

  • principals (required): Array of user UUIDs to add

Response

{
  "ok": true
}

Example:

Notes

  • Users can belong to multiple groups

  • Adding a user already in the group is idempotent

  • Users immediately inherit all roles assigned to the group

Last updated