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

# Create a test case tag

> Creates a tag scoped to a canvas. Tags are later assigned to test cases of that canvas.



## OpenAPI

````yaml POST /test-case-tags
openapi: 3.0.1
info:
  title: Tela API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tela.com
security: []
paths:
  /test-case-tags:
    post:
      tags:
        - Test Case Tag
      summary: Create a test case tag
      description: >-
        Creates a tag scoped to a canvas. Tags are later assigned to test cases
        of that canvas.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestCaseTagCreateRequest'
      responses:
        '201':
          description: The created tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TestCaseTagResponse'
        '400':
          description: Bad request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: >-
            Missing or invalid credentials, or no access to the canvas's
            project.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The project exists in the workspace but the caller's team has no
            access to it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Canvas not found (or a personal draft owned by someone else).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Body failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    TestCaseTagCreateRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 256
        color:
          type: string
          maxLength: 50
        promptId:
          type: string
          format: uuid
          description: Canvas the tag belongs to.
      required:
        - name
        - color
        - promptId
    TestCaseTagResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          maxLength: 256
        color:
          type: string
          maxLength: 50
        promptId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Canvas the tag belongs to. Always set for tags created through this
            API.
        agentId:
          type: string
          format: uuid
          nullable: true
          description: >-
            Set instead of `promptId` for agent test case tags; always `null`
            here.
        workspaceId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
          nullable: true
        updatedAt:
          type: string
          format: date-time
          nullable: true
        deletedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - name
        - color
        - workspaceId
      example:
        id: 4c5d6e7f-8a9b-4c0d-8e1f-2a3b4c5d6e7f
        name: regression
        color: '#F97316'
        promptId: 5f0c1a2e-8b7d-4c3a-9e1f-2d4b6a8c0e12
        agentId: null
        workspaceId: 7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f
        createdAt: '2026-05-04T10:00:00.000Z'
        updatedAt: '2026-05-04T10:00:00.000Z'
        deletedAt: null
    Error: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or UUID

````

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