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

# Create tag

> Creates a new tag in the workspace.



## OpenAPI

````yaml https://folksbase.onrender.com/api/openapi.json post /api/tags
openapi: 3.1.0
info:
  title: folksbase API
  description: >-
    Contact management API for folksbase. Upload CSVs, manage contacts and tags,
    export data.
  version: 1.0.0
servers:
  - url: https://folksbase.onrender.com
    description: Production
  - url: http://localhost:3001
    description: Local development
security:
  - bearerAuth: []
paths:
  /api/tags:
    post:
      tags:
        - Tags
      summary: Create tag
      description: Creates a new tag in the workspace.
      operationId: postApiTags
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                color:
                  type: string
                  maxLength: 20
                emoji:
                  type: string
                  maxLength: 10
              required:
                - name
      responses:
        '201':
          description: Tag created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  workspace_id:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  name:
                    type: string
                  color:
                    anyOf:
                      - type: string
                      - type: 'null'
                  emoji:
                    anyOf:
                      - type: string
                      - type: 'null'
                  created_at:
                    type: string
                required:
                  - id
                  - workspace_id
                  - name
                  - color
                  - emoji
                  - created_at
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - code
                  - message
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase JWT token from Authorization header

````