---
title: "Create a tag"
method: POST
path: "/tag"
tags: ["Tags"]
---

# Create a tag

`POST /tag`

## Request

- Base URL: `https://api.qrcodly.de/api/v1`
- URL: `https://api.qrcodly.de/api/v1/tag`
- Auth: HTTP bearer

Creates a new tag with a name and hex color. Tags can be assigned to QR codes and short URLs for organization.

## Request body

- object
  - `name` string, required: Tag display name (max 32 characters)
  - `color` string, required: Tag color as hex code (e.g. "#FF5733")

## Response `201`

Default Response

- object
  - `id` string, uuid, required: Unique identifier (UUID v4)
  - `createdAt` string, date-time, required: Timestamp when the resource was created (ISO 8601)
  - `updatedAt` string, date-time, nullable, required: Timestamp when the resource was last updated (ISO 8601), or null if never updated
  - `name` string, required: Tag display name (max 32 characters)
  - `color` string, required: Tag color as hex code (e.g. "#FF5733")
  - `createdBy` string, required: User ID of the tag owner
  - `qrCodeCount` number: Number of QR codes assigned to this tag

## Other responses

- `400`: Bad Request — invalid input or validation failure
- `401`: Unauthorized — missing or invalid Bearer token.
- `429`: Too Many Requests — rate limit exceeded. Retry after the rate limit window resets.

---

[API](https://skmtc.dev/qrcodly/apis/qrcodly-api.md) · [All operations](https://skmtc.dev/qrcodly/apis/qrcodly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/qrcodly/apis/qrcodly-api/revisions/b7e95eb68866?raw)
