---
title: "Update Label"
method: PUT
path: "/v1/agents/{agent_id}/labels/{label_id}"
tags: ["Labels"]
---

# Update Label

`PUT /v1/agents/{agent_id}/labels/{label_id}`

rename a free-standing label; reserved labels are not allowed as targets.

## Path parameters

- `agent_id` integer, required
- `label_id` string, uuid, required

## Headers

- `X-API-Key` string, required

## Request body

- UpdateLabelBody
  - `label_text` string, required — new text for the label

## Response `200`

Successful Response

- LabelPydantic — Represents a label record stored in the `labels` table.
  - `id` string, uuid, nullable
  - `created_at` string, date-time, nullable
  - `agent_id` integer, required
  - `label_text` string, required
  - `prompt_id` string, uuid, nullable
  - `knowledge_base_id` string, uuid, nullable
  - `color` string, nullable

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-27** `a52d6f90f25a` — 1 breaking
  - for the `path` request parameter `label_id`, the type/format was changed from `string`/`` to `string`/`uuid`

[Change history](https://skmtc.dev/getbluejay/apis/bluejay-api/changes/v1/agents/:agent_id/labels/:label_id/put.md)

---

[API](https://skmtc.dev/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.dev/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/revisions/84e25a31d733/schema)
