---
title: "Add Tag"
method: POST
path: "/tag/add"
tags: ["tag"]
---

# Add Tag

`POST /tag/add`

Creates a new tag

## Request body

- object
  - `name` string, required — Tag name
  - `type` 'orders' | 'items' | 'purchase_order' | 'customers', required — Tag type
  - `color` 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'purple' | 'indigo' | 'gray' | 'maroon' | 'fuchsia' | 'chartreuse' | 'dodger' | 'salmon' | 'cornflower' | 'khaki' | 'steel' | 'plum' — Tag color

## Response `200`

Tag created or existing tag returned

- object
  - `success` boolean, required — Whether the tag was newly created (false if preexisting)
  - `_id` string, required — Tag ID (new or existing)
  - `name` string, required — Tag name
  - `type` 'orders' | 'items' | 'purchase_order' | 'customers' — Tag type
  - `preexisting` boolean — True if a tag with this name and type already existed

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Forbidden. Insufficient permissions.
- `429` — Too many requests. Rate limit exceeded.
- `500` — Internal server error.

## Changes

- **2026-03-02** `fa53dd949b8e` — 3 breaking, 25 info
  - request property `color` was restricted to a list of enum values
  - the request property `name` became required
  - the request property `type` became required
  - api operation id `post_tag_add` was added
  - …24 more
- **2025-10-07** `3b410dd1cc4b` — 2 breaking, 3 info
  - removed the enum value `item` of the request property `type`
  - removed the enum value `order` of the request property `type`
  - added the new `items` enum value to the request property `type`
  - added the new `orders` enum value to the request property `type`
  - …1 more
- **2024-05-03** `4c3a56636b86` — 1 breaking, 2 info
  - request property `type` was restricted to a list of enum values
  - added the new `item` enum value to the request property `type`
  - added the new `order` enum value to the request property `type`
- **2024-04-22** `08cd9cfa14dd` — 1 breaking, 3 warning, 2 info
  - added required request body
  - deleted the `query` request parameter `color`
  - deleted the `query` request parameter `name`
  - deleted the `query` request parameter `type`
  - …2 more
- **2024-04-19** `46ceda528000` — 2 breaking, 9 info
  - removed the request body
  - removed the media type `application/json` for the response with the status `200`
  - api operation id `post_tag_add` removed and replaced with ``
  - added the new optional `query` request parameter `color`
  - …7 more

[Change history](https://skmtc.dev/skulabs/apis/skulabs-api/changes/tag/add/post.md)

---

[API](https://skmtc.dev/skulabs/apis/skulabs-api.md) · [All operations](https://skmtc.dev/skulabs/apis/skulabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/skulabs/skulabs-api/revisions/4b5ec0ed78a6/schema)
