---
title: "Update Label Key"
method: PATCH
path: "/core/label-keys/{key_id}"
tags: ["Labels"]
---

# Update Label Key

`PATCH /core/label-keys/{key_id}`

## 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/{key_id}`
- Auth: HTTP bearer

Change a key's name, values list or multi flag. The key itself is fixed.

`multi` can change only while no agent or workflow uses the key: turning a
string into a list (or back) under live data is a rewrite nobody asked for.

## Path parameters

- `key_id` string, uuid, required

## Query parameters

- `force` boolean: Remove values in use that the new values list no longer allows, from every agent and workflow, instead of answering 409.

## Headers

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

## Request body

- LabelKeyUpdateRequest: Only the fields present change. `values: null` makes the key free.
  - `name` string, nullable
  - `values` string[], nullable
  - `multi` boolean, nullable

## Response `200`

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)
