> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-rn-guide-message-privately.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update A Group

> Update CometChat group name, type, password, icon, description, and metadata from JavaScript apps.

## Update Group

Use `updateGroup()` to modify group details. Pass a [`Group`](/sdk/reference/entities#group) object with the updated values.

<Tabs>
  <Tab title="TypeScript">
    ```typescript theme={null}
    const GUID: string = "GUID";
    const groupName: string = "Hello Group!";
    const groupType: string = CometChat.GROUP_TYPE.PUBLIC;

    const group: CometChat.Group = new CometChat.Group(GUID, groupName, groupType);

    CometChat.updateGroup(group).then(
    (group: CometChat.Group) => {
    console.log("Group details updated successfully:", group);
    }, (error: CometChat.CometChatException) => {
    console.log("Group details update failed with exception:", error);
    }
    );

    ```
  </Tab>

  <Tab title="JavaScript">
    ```javascript theme={null}
    const GUID = "GUID";
    const groupName = "Hello Group";
    const groupType = CometChat.GROUP_TYPE.PUBLIC;
    const group = new CometChat.Group(GUID, groupName, groupType);

    CometChat.updateGroup(group).then(
    group => {
      console.log("Groups details updated successfully:", group);
    }, error => {
      console.log("Group details update failed with exception:", error);
    }
    );
    ```
  </Tab>
</Tabs>

| Parameter | Description                                                                       |
| --------- | --------------------------------------------------------------------------------- |
| `group`   | An instance of [`Group`](/sdk/reference/entities#group) class with updated values |

On success, returns a [`Group`](/sdk/reference/entities#group) object with the updated details.

<Note>
  There is no real-time event listener for group updates. To get the latest
  group information after calling `updateGroup()`, fetch the group details again
  using `getGroup()`.
</Note>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Delete Group" icon="trash" href="/sdk/javascript/delete-group">
    Permanently delete a group
  </Card>

  <Card title="Retrieve Groups" icon="magnifying-glass" href="/sdk/javascript/retrieve-groups">
    Fetch and filter groups with pagination
  </Card>
</CardGroup>
