> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getmatter.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Rename Tag

> Rename a tag. The new name applies to all items that have this tag.

## Path Parameters

**id** `string` *required*

The tag ID. Example: `tag_n5j2x`.

## Body Parameters

**name** `string` *required*

The new tag name.

## Response

Returns the updated tag.

```bash cURL theme={null}
curl -X PATCH https://api.getmatter.com/public/v1/tags/tag_n5j2x \
  -H "Authorization: Bearer mat_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{"name": "long-reads"}'
```

```python Python theme={null}
response = requests.patch(
    "https://api.getmatter.com/public/v1/tags/tag_n5j2x",
    headers={
        "Authorization": f"Bearer {token}",
        "Content-Type": "application/json"
    },
    json={"name": "long-reads"}
)
tag = response.json()
```

```json 200 theme={null}
{
  "object": "tag",
  "id": "tag_n5j2x",
  "name": "long-reads",
  "item_count": 42,
  "created_at": "2025-01-15T10:00:00Z"
}
```

```json 409 theme={null}
{
  "error": {
    "code": "conflict",
    "message": "A tag with this name already exists.",
    "field": "name"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.