---
title: "Create Tag"
description: "Creates a new tag in your organization. Readonly members may create tags that are visible only to themselves."
---

`POST /api/tags`

## Body

```json
{
  "name": "Production",
  "color": "red"
}
```

- `name` (required): Display label for the tag (max 50 characters).
- `color` (required): 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>"

curl -X POST "$BASE_URL/api/tags" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"Production","color":"red"}'
```

## Response

```json
{
  "id": 1,
  "publicId": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
  "organizationId": 10,
  "name": "Production",
  "color": "red",
  "createdBy": 42,
  "createdAt": "2026-06-29T10:00:00.000Z",
  "updatedAt": "2026-06-29T10:00:00.000Z"
}
```

## Common errors

- `400 invalidTagColor` when `color` is not a recognized palette key
- `400 Bad Request` when `name` is missing or exceeds the character limit
- `401 Unauthorized` when you are not logged in
- `403 Forbidden` when you cannot access the organization
