---
title: "Create label"
method: POST
path: "/label"
tags: ["Labels"]
---

# Create label

`POST /label`

Create a new label in a workspace

## Request body

- object
  - `name` string, required
  - `color` string, required
  - `workspaceId` string, required
  - `taskId` string

## Response `200`

Label created 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` — Invalid body, or workspace ID could not be determined
- `401` — Missing or invalid credentials
- `403` — No workspace access, or missing label:create 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` — 2 breaking
  - request body became required
  - the `createdAt` response's property type/format changed from ``/`` to `string`/`date-time` for status `200`
- **2026-03-05** `c45ef22a736c` — 2 breaking, 2 info
  - the response property `taskId` became nullable for the status `200`
  - the response property `workspaceId` became nullable for the status `200`
  - response property `taskId` list-of-types was narrowed by removing types `null` from media type `application/json` of response `200`
  - response property `workspaceId` list-of-types was narrowed by removing types `null` from media type `application/json` of response `200`
- **2026-03-04** `298877d6a79a` — 2 breaking
  - response property `taskId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `workspaceId` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
- …earlier changes not shown

[Full history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/label/post.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/7ccee4eec682/schema)
