---
title: "Attach label to task"
method: PUT
path: "/label/{id}/task"
tags: ["Labels"]
---

# Attach label to task

`PUT /label/{id}/task`

Attach an existing label to a task

## Path parameters

- `id` string, required

## Request body

- object
  - `taskId` string, required

## Response `200`

Label attached to task successfully

- Label
  - `id` string, required
  - `name` string, required
  - `color` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `taskId` string, nullable, required
  - `workspaceId` string, nullable, required

## Other responses

- `400` — Unknown label, or label and task belong to different workspaces
- `401` — Missing or invalid credentials
- `403` — No workspace access, or missing label:update permission
- `404` — Task not found

## Changes

- **2026-08-24** `08bbb5bedb5d` — 5 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `401`
  - added the non-success response with the status `403`
  - added the non-success response with the status `404`
  - …1 more
- **2026-07-11** `32cece1ebe43` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/label/:id/task/put.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) · [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/usekaneo/kaneo-api/revisions/08bbb5bedb5d/schema)
