Quick Reference for AI Agents & DevelopersNote: Only admins and moderators can update group details. See Group Class for editable fields.
Update Group
As a group owner, how can I update the group details? You can update the existing details of a group using theupdateGroup() method.
- Java
- Kotlin
Group class as a parameter, which should contain the data you wish to update.
| Parameter | Description |
|---|---|
group | An instance of the Group class |
Group class containing the updated information of the group.
For more information on the Group class, see here.
Best Practices
Update Only Changed Fields
Update Only Changed Fields
Create a Group object with the GUID and only set the fields you want to update. Unchanged fields will retain their existing values.
Use Metadata for Custom Properties
Use Metadata for Custom Properties
Store custom group properties in the metadata field as JSON to extend group functionality without modifying the core schema.
Validate Input Before Updating
Validate Input Before Updating
Validate group names, descriptions, and icon URLs before calling updateGroup() to avoid API errors and improve user experience.
Handle Update Events
Handle Update Events
Listen for group update events to keep your UI synchronized when other admins or moderators modify group details.
Troubleshooting
Update Failed - Insufficient Permissions
Update Failed - Insufficient Permissions
Symptom:
updateGroup() fails with “Insufficient permissions” error.Cause: User is not an admin or moderator of the group.Solution: Only admins and moderators can update group details. Check the user’s scope using group.getScope() before attempting updates.Update Failed - Invalid GUID
Update Failed - Invalid GUID
Symptom:
updateGroup() fails with “Group not found” error.Cause: The GUID in the Group object is incorrect or the group doesn’t exist.Solution: Verify the GUID is correct. Fetch the group first using retrieve-groups to ensure it exists.Cannot Change Group Type
Cannot Change Group Type
Symptom: Group type doesn’t change after calling
updateGroup().Cause: Group type (public/private/password) cannot be changed after creation.Solution: Group type is immutable. If you need a different type, create a new group and migrate members.