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

# Create label

> Create a label for organizing test cases. Labels are also created implicitly when a test case is saved with a new label name; use this to pick the color.



## OpenAPI

````yaml /api-reference/api.json post /v1/labels
openapi: 3.0.0
info:
  title: QA.tech API
  version: 1.0.0
  contact:
    name: QA.tech
    url: https://qa.tech
    email: support@qa.tech
  description: API for triggering and managing AI-powered test runs
servers:
  - url: https://api.qa.tech
    description: Production
    variables: {}
security:
  - BearerAuth: []
tags:
  - name: Runs
  - name: Infrastructure
  - name: Test Cases
  - name: Application Builds
  - name: Status badge
  - name: Remote Tunnels
  - name: Chat
  - name: Applications
  - name: Features
  - name: Metrics
  - name: Projects
  - name: Knowledge
  - name: Rules
  - name: Labels
  - name: Issues
  - name: Todos
  - name: Automations
  - name: Test plans
paths:
  /v1/labels:
    post:
      tags:
        - Labels
      summary: Create label
      description: >-
        Create a label for organizing test cases. Labels are also created
        implicitly when a test case is saved with a new label name; use this to
        pick the color.
      operationId: CreateLabel
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLabelRequest'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateLabelResponse'
components:
  schemas:
    CreateLabelRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 40
        color:
          type: string
          pattern: ^#[0-9A-Fa-f]{6}$
          description: Hex color such as `#3B82F6`. Defaults to gray.
        projectShortId:
          allOf:
            - $ref: '#/components/schemas/ProjectShortId'
          description: >-
            Target a specific project by its prefixed short ID
            (proj-slug_shortId or proj_shortId), as returned by the projects
            API. Required for organization-scoped API keys; project-scoped keys
            may only pass their own project's short ID.
    CreateLabelResponse:
      type: object
      required:
        - success
        - label
      properties:
        success:
          type: boolean
        label:
          $ref: '#/components/schemas/ProjectLabel'
    ProjectShortId:
      type: string
      pattern: ^proj(-.+_.+|_.+)$
    ProjectLabel:
      type: object
      required:
        - id
        - name
        - color
        - createdAt
        - updatedAt
      properties:
        id:
          type: string
          description: Label id (UUID)
        name:
          type: string
          description: >-
            Label name, unique within the project. This is the string test cases
            and rule filters refer to.
        color:
          type: string
          description: Hex color such as `#3B82F6`
        createdAt:
          type: string
        updatedAt:
          type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: Bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.