Skip to main content
// Delete a group (admin only)
await CometChat.deleteGroup("GUID");
Requirement: Logged-in user must be an Admin of the group.
This operation is irreversible. Deleted groups and their messages cannot be recovered.

Delete a Group

Use deleteGroup() to permanently delete a group. Only group admins can perform this operation.
const GUID = "GUID";

CometChat.deleteGroup(GUID).then(
response => {
  console.log("Groups deleted successfully:", response);
}, error => {
  console.log("Group delete failed with exception:", error);
}
);
The deleteGroup() method takes the following parameters:
ParameterDescription
GUIDThe GUID of the group you would like to delete
On success, the method resolves with a success message string confirming the operation.

Next Steps

Update a Group

Update group name, icon, description, and metadata

Leave a Group

Leave a group you are a member of

Create a Group

Create public, private, or password-protected groups

Groups Overview

Overview of all group management features