---
title: "Create a Tag."
method: POST
path: "/tags"
tags: ["tags"]
---

# Create a Tag.

`POST /tags`

## Request

- Base URL: `https://restivity.ai/api/v1`
- URL: `https://restivity.ai/api/v1/tags`
- Auth: OAuth 2 (authorization code, authorization URL `https://restivity.ai/oauth/authorize`, token URL `https://restivity.ai/api/oauth/token`, scopes: `tags:write`)

## Request body

- CreateTagInput
  - `name` string, required
  - `color` string

## Response `201`

The created Tag.

- Tag
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `name` string, required
  - `color` string, required
  - `usage_count` integer, required
  - `deleted_at` string, nullable, required

## Other responses

- `400`: Invalid request shape.
- `401`: Missing or invalid access token.
- `403`: Token lacks the required scope.
- `409`: `name_taken` — You already have a tag of this name in this scope (your global tags, or one workspace). Names are compared without case and without surrounding spaces; nothing was written. Rename, or use the existing tag.
- `422`: Request body failed schema validation.
- `429`: Rate-limit exceeded for this tier.

---

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