# archiveTagGroup mutation


`archiveTagGroup` is a GraphQL mutation of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Archives a tag group: its tags can no longer be added, and records that have them keep them.
The tags stay in the group. There is no restore. Archiving an archived group changes nothing.

#### Permissions

Requires the `tag.manage` permission.

#### Errors

- `NOT_FOUND` when no tag group has the code.

## Arguments

- `code`: `String!` · required

## Returns

[`TagGroup!`](/chameleoon-max/type/tag-group)

## Example

**Mutation**

```graphql
mutation archiveTagGroup($code: String!) {
  archiveTagGroup(code: $code) {
    code
    name
    exclusive
    automationOnly
    archived
    description
    agendas
    sortOrder
  }
}
```

**Variables**

```json
{
  "code": "example"
}
```

**Response**

```json
{
  "data": {
    "archiveTagGroup": {
      "code": "example",
      "name": "example",
      "exclusive": true,
      "automationOnly": true,
      "archived": true,
      "description": "example",
      "agendas": [
        "SALES_ORDER"
      ],
      "sortOrder": 1
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
