# PUT /api/v1/tag-groups/{tag_group_id}

> Update tag group

- **Tag:** tags
- **Operation ID:** `update_tag_group_api_v1_tag_groups__tag_group_id__put`

## Description

Update an existing tag group

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `tag_group_id` (path, string, required)

## Request body

Schema: `TagGroupUpdate`

- `name` (string) — Name of the tag group
- `description` (string) — Description of the tag group

## Responses

### 200 — Successful Response

Schema: `TagGroupResponse`

- `name` (string · required) — Name of the tag group
- `description` (string) — Description of the tag group
- `id` (string · required) — Unique identifier for the tag group
- `tag_count` (integer) — Number of tags in this group
- `created_at` (string · date-time · required) — Timestamp when the tag group was created
- `updated_at` (string · date-time · required) — Timestamp when the tag group was last updated

### 400 — Bad Request - Invalid input

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X PUT 'https://api.ondayzero.com/api/v1/tag-groups/{tag_group_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "description": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/tag-groups/{tag_group_id}', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "name": "string",
  "description": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

payload = {
  "name": "string",
  "description": "string"
}

response = httpx.put("https://api.ondayzero.com/api/v1/tag-groups/{tag_group_id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/tags/update-tag-group
- OpenAPI slice: https://www.ondayzero.com/docs/reference/tags/update-tag-group/openapi.json
- Other endpoints in **tags**: https://www.ondayzero.com/docs/reference/tags
