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

# Create Tag

> Creates a new tag for the organization. Tag names must be unique within the organization.




## OpenAPI

````yaml POST /tags
openapi: 3.0.3
info:
  title: AlfaOne Public API
  description: >
    Public API for third-party integrations with AlfaOne assessment platform.


    ## Authentication

    All endpoints require an API key passed in the `x-api-key` header.

    API keys can be generated from the Integrations page in your organization's
    admin dashboard.


    Each API key is scoped to a single organization, and all data returned will
    be filtered to that organization.
  version: 1.0.0
  contact:
    name: AlfaOne Support
servers:
  - url: https://alfaone.app/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Assessments
    description: Operations related to assessments
  - name: Questions
    description: Operations related to assessment questions
  - name: Members
    description: Operations related to organization members
  - name: Invites
    description: Operations related to assessment invites
  - name: Tags
    description: Operations related to organization tags
paths:
  /tags:
    post:
      tags:
        - Tags
      summary: Create a tag
      description: >
        Creates a new tag for the organization. Tag names must be unique within
        the organization.
      operationId: createTag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagRequest'
      responses:
        '201':
          description: Tag created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  tag:
                    $ref: '#/components/schemas/Tag'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateTagRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the tag (must be unique within the organization)
        color:
          type: string
          description: Hex color code for the tag
          default: '#6366f1'
          example: '#6366f1'
        description:
          type: string
          description: Optional description of the tag
    Tag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the tag
        name:
          type: string
          description: Name of the tag (unique within the organization)
        color:
          type: string
          description: Hex color code for the tag
          example: '#6366f1'
        description:
          type: string
          nullable: true
          description: Optional description of the tag
        createdAt:
          type: string
          format: date-time
          description: When the tag was created
        updatedAt:
          type: string
          format: date-time
          description: When the tag was last updated
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_field:
              summary: Missing required field
              value:
                error: assessmentId is required
            invalid_email:
              summary: Invalid email format
              value:
                error: recipientEmail is not a valid email address
            invalid_limit:
              summary: Invalid limit value
              value:
                error: questionReplayLimit must be a positive integer
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing_key:
              summary: Missing API key
              value:
                error: API key is required
            invalid_key:
              summary: Invalid API key
              value:
                error: Invalid API key
            expired_key:
              summary: Expired API key
              value:
                error: API key has expired
            revoked_key:
              summary: Revoked API key
              value:
                error: API key has been revoked
    Conflict:
      description: Resource already exists
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: An invite for this email and assessment already exists
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal server error
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. Format:
        ak_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

````