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

# Update A Group

## Update Group

*In other words, as a group owner, how can I update the group details?*

You can update the existing details of the group using the `updateGroup()` method.

<Tabs>
  <Tab title="JavaScript">
    ```js
    var GUID = "GUID";
    var groupName = "Hello Group";
    var groupType = CometChat.GROUP_TYPE.PUBLIC;
    var 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>

  <Tab title="TypeScript">
    ```ts
    var GUID: string = "GUID";
    var groupName: string = "Hello Group!";
    var groupType: string = CometChat.GROUP_TYPE.PUBLIC;

    var 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>
</Tabs>

This method takes an instance of the `Group` class as a parameter which should contain the data that you wish to update.

| Parameter | Description                  |
| --------- | ---------------------------- |
| `group`   | an instance of class `Group` |

After a successful update of the group, you will receive an instance of `Group` class containing update information of the group.

For more information on the `Group` class, please check [here](/sdk/ionic/3.0/groups-create-group#group-class).
