---
title: "Create Label Key"
method: POST
path: "/core/label-keys"
tags: ["Labels"]
---

# Create Label Key

`POST /core/label-keys`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/label-keys`
- Auth: HTTP bearer

Create a key. A key cannot be renamed afterwards; its name can.

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- LabelKeyCreateRequest
  - `key` string, required: Lowercase letters, digits and _, 1-40.
  - `name` string, required
  - `values` string[], nullable: Allowed values, or null for any value.
  - `multi` boolean

## Response `201`

Successful Response

- LabelKeyResponse
  - `id` string, required
  - `key` string, required
  - `name` string, required
  - `values` string[], nullable
  - `multi` boolean
  - `agent_count` integer
  - `workflow_count` integer
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `created_by` string, nullable
  - `modified_by` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
