# Create a tag

`POST https://api.cademi.com.br/api/v3/tags`

Operation ID: `tags.create` · API v3

Creates a tag that can be assigned to users.

Leading and trailing whitespace is removed from the name. Tag names must be unique within the account; if the name is already in use, the API returns `409 Conflict` with the `already_exists` error code.

Required permissions: `tags.create`.

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | string | yes |  |

## Responses

### 201

Returns the newly created tag. The Location header contains the URL of the new tag.

Body: `data`: Tag.

Fields of Tag:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `tag` | yes |  |
| `revision` | string | yes |  |
| `updated_at` | string (date-time) | yes |  |
| `users_count` | integer | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
