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

# Create Tag

`POST /api/tag`

Create a new tag for a given workspace.

If 'shared' is provided, the tag will be set to shared or private accordingly.
If 'shared' is not provided, it defaults to True (shared).

## Headers

- `workspace-key` string

## Request body

- CreateTagRequest — Request to create a new tag in a workspace.
  - `name` string, required
  - `instruction` string, nullable
  - `tag_type` TagFormat — Tag format configuration stored as JSONB. Type-specific fields: - select: options (list of choices, can be single or multi-select) - search: tag name is the query, chunks include relevance scores - checkbox, text, number, folder: type only
    - `type` 'checkbox' | 'text' | 'number' | 'select' | 'folder' | 'search' | 'date'
    - `options` string[]
  - `workspace_ext_id` string, required
  - `shared` boolean, nullable
  - `parent_ext_id` string, nullable

## Response `201`

Successful Response

- TagResponse
  - `external_id` string, required
  - `workspace_ext_id` string, required
  - `name` string, required
  - `instruction` string, nullable
  - `tag_type` TagFormat, required — Tag format configuration stored as JSONB. Type-specific fields: - select: options (list of choices, can be single or multi-select) - search: tag name is the query, chunks include relevance scores - checkbox, text, number, folder: type only
    - `type` 'checkbox' | 'text' | 'number' | 'select' | 'folder' | 'search' | 'date'
    - `options` string[]
  - `shared` boolean, required
  - `parent_ext_id` string, nullable
  - `doctag_count` integer, required
  - `created_by_ext_id` string, required
  - `updated_by_ext_id` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-01-20** `ec6f27613280` — 1 warning, 1 info
  - added the new `date` enum value to the `tag_type/type` response property for the response status `201`
  - added the new `date` enum value to the request property `tag_type/type`
- **2026-01-16** `6b174ff0bc3a` — 2 info
  - added the new optional request property `instruction`
  - added the optional property `instruction` to the response with the `201` status
- **2026-01-07** `249354af19dc` — 1 warning, 1 info
  - added the new `search` enum value to the `tag_type/type` response property for the response status `201`
  - added the new `search` enum value to the request property `tag_type/type`
- **2025-11-09** `dc6f981b30b5` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/arbicity/apis/arbi/changes/api/tag/post.md)

---

[API](https://skmtc.dev/arbicity/apis/arbi.md) · [All operations](https://skmtc.dev/arbicity/apis/arbi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arbicity/arbi/revisions/1f956ac3d1c1/schema)
