AI Integration Quick Reference
AI Integration Quick Reference
PUBLIC | PASSWORD | PRIVATE
Member scopes: ADMIN | MODERATOR | PARTICIPANTcreateGroup(), or create one and add members in a single call with createGroupWithMembers(). See the Group Class reference at the bottom for all available fields.
Create a Group
UsecreateGroup() to create a new group. Pass a Group object with the group details.
- TypeScript
- JavaScript
On success, returns a
Group object with the created group’s details.
Add Members While Creating a Group
UsecreateGroupWithMembers() to create a group and add members in one operation.
Parameters:
group— TheGroupobjectmembers— Array ofGroupMemberobjects to addbannedMembers— Array of UIDs to ban (can be empty)
GroupMember with: new CometChat.GroupMember(UID, scope)
- TypeScript
- JavaScript
group— The createdGroupobjectmembers— Object with UIDs as keys and"success"or error message as values
Group Class
TheGroup object has the following fields. Fields marked “Yes” in the Editable column can be modified after creation using updateGroup().
Next Steps
Join a Group
Join public, private, or password-protected groups
Add Members
Add users to an existing group
Retrieve Groups
Fetch and filter group lists
Groups Overview
Overview of all group management features