---
title: "Update Tag"
description: "Updates an existing tag's name or color. Only the tag owner or an admin may update a tag."
---

`PATCH /api/tags/{id}`

Path parameter `{id}` is the tag's numeric `id`.

## Body

All fields are optional; send only the fields you want to change.

```json
{
  "name": "Critical",
  "color": "violet"
}
```

- `name` (optional): New display label (max 50 characters).
- `color` (optional): One of the palette keys: `slate` | `red` | `amber` | `green` | `teal` | `blue` | `indigo` | `violet` | `pink` | `gray`.

## Example (cURL)

```bash
BASE_URL="https://uptimeify.io"
TOKEN="<your-api-token>"
TAG_ID=1

curl -X PATCH "$BASE_URL/api/tags/$TAG_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Critical","color":"violet"}'
```

## Response

```json
{
  "id": 1,
  "publicId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
  "organizationId": 10,
  "name": "Critical",
  "color": "violet",
  "createdBy": 42,
  "createdAt": "2026-06-01T08:00:00.000Z",
  "updatedAt": "2026-06-29T11:00:00.000Z"
}
```

## Common errors

- `400 invalidTagColor` when `color` is not a recognized palette key
- `401 Unauthorized` when you are not logged in
- `403 Forbidden` when you are not the tag owner or an admin
- `404 Not Found` when the tag does not exist or is not visible to you
