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

# Create a tag

`POST /tags/`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/tags/`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/tags/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a new tag in the caller's tenant.

## Query parameters

- `cookie_name` string, nullable

## Request body

- TagIn
  - `name` string, required: Tag label, unique per tenant. Leading/trailing whitespace is stripped.

## Response `201`

Successful Response

- Tag
  - `created_at` string, date-time: UTC timestamp when the record was created.
  - `updated_at` string, date-time: UTC timestamp when the record was last updated.
  - `id` integer, nullable: Primary key for the tag.
  - `tenant_id` integer, required: ID of the tenant that owns the tag.
  - `name` string, required: Name of the tag.
  - `creator_user_id` integer, nullable: ID of the user who created the tag.
  - `updater_user_id` integer, nullable: ID of the user who last updated the tag.

## Other responses

- `401`: Missing or invalid authentication.
- `422`: Validation Error

---

[API](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
