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

# Create a tag

`POST /tags`

## Request

- Base URL: `https://sending.dev/api/v1`
- URL: `https://sending.dev/api/v1/tags`
- Auth: HTTP bearer

Idempotent on the name (unique per workspace, case-insensitive): if the tag already exists it answers 200 with `created: false` and its id, so there is no 409 to handle and re-read. The color of a repeated request does not overwrite the existing tag's color. Required scope: `contacts:write`.

## Request body

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

## Response `200`

A tag with this name already exists.

- NamedUpserted
  - `id` string, uuid, required
  - `name` string, required
  - `created` boolean, required

## Other responses

- `201`: Tag created.
- `401`: Missing or invalid token.
- `403`: Insufficient scope.
- `422`: Invalid input.

---

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