> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/007_groups/007__update_group.md).

# Update Group

GraphQL endpoint: `/user`

Updates an existing group's information. Only group admins can update group settings. You can update the name, metadata, secret storage, and visibility settings.

## Query

```graphql
mutation (
  $groupId: ID!
  $name: String
  $metadata: JSON
  $secretStorage: JSON
  $visibility: [GroupVisibilityType!]
) {
  updateGroup (
    groupId: $groupId
    name: $name
    metadata: $metadata
    secretStorage: $secretStorage
    visibility: $visibility
  ) {
    id
    name
    metadata
    secretStorage
    visibility
    }
  }

```

## Variables

```json
{
  "groupId": "00000000-0000-4000-8000-000000000001",
  "metadata": {
    "test": "updated-value"
  },
  "name": "updated-groupname",
  "secretStorage": {
    "secret-key": "secret-value"
  },
  "visibility": [
    "CONNECTIONS"
  ]
}
```

## Response

```json
{
  "data": {
    "updateGroup": {
      "id": "00000000-0000-4000-8000-000000000001",
      "metadata": {
        "test": "updated-value"
      },
      "name": "updated-groupname",
      "secretStorage": {
        "secret-key": "secret-value"
      },
      "visibility": [
        "CONNECTIONS"
      ]
    }
  }
}
```
