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

# Create tag

> Create a thread tag. `tag_group_id` is required; fetch the workspace's groups via `GET /tags/groups`. Requires the tags:write scope.



## OpenAPI

````yaml post /tags
openapi: 3.0.3
info:
  title: Productlane API
  description: Productlane API v2.
  version: 2.0.0
servers:
  - url: https://productlane.com/api/v2
security: []
paths:
  /tags:
    post:
      tags:
        - tags
      summary: Create tag
      description: >-
        Create a thread tag. `tag_group_id` is required; fetch the workspace's
        groups via `GET /tags/groups`. Requires the tags:write scope.
      operationId: tags-create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                color:
                  type: string
                  pattern: ^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
                  description: Hex color in `#RRGGBB` or `#RGB` form.
                icon:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: >-
                    Name of a Nucleo icon (PascalCase, e.g. `Notepad`, `Atom`).
                    Must be a valid icon from https://nucleoapp.com - unknown
                    names will not render in the dashboard.
                tag_group_id:
                  type: string
                  description: >-
                    Tag group id. Required. Fetch the workspace's groups via
                    `GET /tags/groups`.
              required:
                - name
                - color
                - icon
                - tag_group_id
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  color:
                    type: string
                  icon:
                    type: string
                    nullable: true
                    description: >-
                      Name of a Nucleo icon (PascalCase, e.g. `Notepad`,
                      `Atom`). Must be a valid icon from https://nucleoapp.com -
                      unknown names will not render in the dashboard or portal.
                  tag_group_id:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                  updated_at:
                    type: string
                required:
                  - id
                  - name
                  - color
                  - icon
                  - tag_group_id
                  - created_at
                  - updated_at
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  type: object
                  properties:
                    message:
                      type: string
                  required:
                    - message
                  additionalProperties: false
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````