Upsert user group
POST/groups-srv/usergroups
Creates or updates a user group. Pass groupId in the request body (not in the path).
PUT /groups-srv/usergroups uses the same handler. Prefer PUT when you intend to update an existing group; POST also upserts.
Do not call PUT /groups-srv/usergroups/{groupId} — that path only supports GET and DELETE and returns HTTP 405 for PUT.
Updatable Fields:
groupId: Required in the body; cannot be changed after creation (unique identifier)groupName: Display namegroupType: Must reference an existing group typeparentId:"root"or a valid existing groupId (no circular references)customFields: Updated, added, or removed- Visibility settings:
memberProfileVisibility,noneMemberProfileVisibility make_first_user_admin
Immutable Fields:
groupOwner: Cannot be set; defaults to client
Validation Rules:
groupId: Required in the bodygroupName: If provided, cannot be emptygroupType: If provided, must reference an existing group typeparentId: If provided, must be"root"or a valid existing groupId- Circular references are not allowed
Business Rules:
- When changing
groupType, ensure the new groupType's roleMode allows roles currently assigned in this group - When changing
parentId, the new parent must exist and must not create circular references - System-managed user groups (
groupOwner: admin) cannot be updated via API
Request
Responses
- 200
- 201
- 401
- 404
- 417
OK - User group updated successfully
Created - User group created successfully
Unauthorized - Authentication failed or missing required scope
Not Found - Referenced resource does not exist (for example invalid groupType)
Expectation Failed - Validation failed (e.g., invalid groupType, invalid parentId, circular reference, or missing required fields)