> ## Documentation Index
> Fetch the complete documentation index at: https://kaneo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create label

> Create a new label in a workspace



## OpenAPI

````yaml /openapi.json post /label
openapi: 3.1.0
info:
  title: Kaneo API
  version: 1.0.0
  description: Kaneo Project Management API - Manage projects, tasks, labels, and more
servers:
  - url: https://cloud.kaneo.app/api
    description: Kaneo API Server
security:
  - bearerAuth: []
paths:
  /label:
    post:
      tags:
        - Labels
      summary: Create label
      description: Create a new label in a workspace
      operationId: createLabel
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                color:
                  type: string
                workspaceId:
                  type: string
                taskId:
                  type: string
              required:
                - name
                - color
                - workspaceId
      responses:
        '200':
          description: Label created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Label'
        '400':
          description: Invalid body, or workspace ID could not be determined
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: Missing or invalid credentials
        '403':
          description: No workspace access, or missing label:create permission
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: Task not found
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    Label:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        color:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        taskId:
          type:
            - string
            - 'null'
        workspaceId:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - color
        - createdAt
        - updatedAt
        - taskId
        - workspaceId
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or session token (Bearer)

````