# Update Tag Beta

> Rename or recolor a tag.

> Documentation index: https://www.foxreach.io/docs/llms.txt lists every page of these docs. Each page is also served as Markdown: add `.md` to its URL.

`PATCH` https://api.foxreach.io/api/v1/tags/{tag_id}

> **Note:** **Beta.** This endpoint is new and may change.

Requires an API key with the `write` scope.

Changes the name or the color. The type cannot change. A lead tag's new name is lowercased. A warmup tag returns `404`.

## Path Parameters

- `tag_id` string path required: The tag id.

## Request Body

- `name` string body: 1 to 100 characters.
- `color` string body: `#RRGGBB`.

**Request example**

```bash cURL
curl -X PATCH "https://api.foxreach.io/api/v1/tags/tag_abc123" \
  -H "X-API-Key: otr_your_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "hot"}'
```

```python Python SDK (beta)
from foxreach import FoxReach

client = FoxReach(api_key="otr_your_key")
tag = client.tags.update("tag_abc123", name="hot")
```

```typescript TypeScript SDK (beta)
import { FoxReach } from "foxreach";

const client = new FoxReach({ apiKey: "otr_your_key" });
const tag = await client.tags.update("tag_abc123", { name: "hot" });
```

**Response example**

```json
{
  "data": {
    "id": "tag_abc123",
    "name": "vip",
    "color": "#6B7280",
    "type": "lead",
    "createdAt": "2026-12-03T09:00:00+00:00"
  }
}
```

## Errors

| Status | Description |
|--------|-------------|
| `401` | Missing, invalid, revoked or expired API key |
| `403` | API key does not have the required scope: `write` |
| `404` | Tag not found |
| `409` | A tag with that name and type already exists |
| `422` | Invalid name or color |

## Rate Limit

- **120 requests per minute, shared by every `write` call in your workspace.** Fixed 60-second window.
- Every response includes `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (unix epoch seconds) and `X-RateLimit-Bucket` (`write`).
- A `429` response includes a `Retry-After` header (seconds until the bucket resets).

For client-side patterns, see [Rate Limiting](https://www.foxreach.io/docs/rate-limiting).
