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

# Create a tag

> Create a tag that can be applied to your end_users. Names are normalized to lowercase. They must contain 1-140 alphanumeric characters plus _ - : and are unique per user (case-insensitive).




## OpenAPI

````yaml https://app.herondata.io/swagger post /api/tags
openapi: 3.0.0
info:
  contact:
    email: support@herondata.io
    name: Support
  title: Heron Data API
  version: '2021-07-19'
servers:
  - description: Production
    url: https://app.herondata.io
security:
  - ApiKeyAuth:
      - key_XXX
externalDocs:
  description: Read Tutorial
  url: https://docs.herondata.io/
paths:
  /api/tags:
    post:
      tags:
        - Tags
      summary: Create a tag
      description: >
        Create a tag that can be applied to your end_users. Names are normalized
        to lowercase. They must contain 1-140 alphanumeric characters plus _ - :
        and are unique per user (case-insensitive).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagSchema'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                properties:
                  tag:
                    $ref: '#/components/schemas/TagSchema'
                type: object
          description: OK
        '400':
          description: Invalid request body
        '422':
          description: Tag name already exists
      security:
        - ApiKeyAuth: []
components:
  schemas:
    TagSchema:
      properties:
        color:
          description: >-
            Optional display color as a six-digit hex code such as #1a2b3c,
            normalized to lowercase.
          nullable: true
          type: string
        description:
          description: Optional human-readable description of the tag.
          nullable: true
          type: string
        heron_id:
          description: Unique identifier for the tag
          readOnly: true
          type: string
        name:
          description: >-
            Identifier normalized to lowercase: alphanumeric plus '_', '-', ':',
            up to 140 chars. Unique per user (case-insensitive).
          type: string
      required:
        - name
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````