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

# Update A Group

> Update group details such as name, type, icon, and description using the CometChat React Native SDK.

<Accordion title="AI Integration Quick Reference">
  | Field          | Value                                                                                                                                                                        |
  | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Package        | `@cometchat/chat-sdk-react-native`                                                                                                                                           |
  | Import         | `import { CometChat } from "@cometchat/chat-sdk-react-native";`                                                                                                              |
  | Key Methods    | `updateGroup()`                                                                                                                                                              |
  | Key Classes    | `CometChatException`, `GROUP_TYPE`, `Group`                                                                                                                                  |
  | Prerequisites  | SDK initialized via [`CometChat.init()`](/sdk/react-native/setup-sdk) and a logged-in user via [`CometChat.login()`](/sdk/react-native/authentication-overview)              |
  | Primary output | `Promise<CometChat.Group>` — the updated group; rejects with `CometChatException`                                                                                            |
  | Constraints    | Owner or admin only. The GUID cannot be changed — pass the existing GUID and only the fields you are altering.                                                               |
  | Related        | [Create a Group](/sdk/react-native/create-group) · [Retrieve Groups](/sdk/react-native/retrieve-groups) · [Change Member Scope](/sdk/react-native/group-change-member-scope) |
  | Full reference | [`Group`](/sdk/reference/entities#group) · [`CometChatException`](/sdk/reference/auxiliary#cometchatexception)                                                               |

  ```javascript theme={null}
  // Update group details
  const group = new CometChat.Group("GUID", "New Name", CometChat.GROUP_TYPE.PUBLIC);
  const updated = await CometChat.updateGroup(group);
  ```
</Accordion>

Update a group's name, icon, description, or metadata. The GUID and group type cannot be changed after creation. See the [Group Class](/sdk/react-native/create-group#group-class) reference for all editable fields.

## 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/react-native/delete-group">
    Permanently delete a group
  </Card>

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

  <Card title="Group Members" icon="users" href="/sdk/react-native/retrieve-group-members">
    Manage members, roles, and permissions within groups
  </Card>

  <Card title="Create a Group" icon="plus" href="/sdk/react-native/create-group">
    Create public, private, or password-protected groups
  </Card>
</CardGroup>
