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

# Create a tag in a workspace



## OpenAPI

````yaml https://data.otterly.ai/v1/openapi.json post /v1/workspaces/{id}/tags
openapi: 3.0.0
info:
  title: Otterly Public API
  version: 1.0.0
servers:
  - url: https://data.otterly.ai
security: []
tags:
  - name: Engines
  - name: Workspaces
  - name: Tags
  - name: Prompts
  - name: Brand Reports
  - name: Audits
  - name: Accounts
paths:
  /v1/workspaces/{id}/tags:
    post:
      tags:
        - Tags
      summary: Create a tag in a workspace
      parameters:
        - schema:
            type: string
            minLength: 1
            example: 01HX7K2YV9D3M8N0G6Q5R4S3T2
            description: Workspace identifier.
          required: true
          description: Workspace identifier.
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicApiCreateWorkspaceTagRequest'
      responses:
        '201':
          description: The created tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiCreatedWorkspaceTag'
        '400':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiValidationErrorResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorResponse'
        '403':
          description: Forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorResponse'
        '429':
          description: Quota exhausted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    PublicApiCreateWorkspaceTagRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Tag name.
        color:
          type: string
          minLength: 1
          description: >-
            Tag color (Ant Design preset color name, e.g. 'gold', 'orange',
            'magenta', 'green', 'blue').
      required:
        - name
        - color
      example:
        name: Competitors
        color: gold
    PublicApiCreatedWorkspaceTag:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          example: 01HX7K2YV9D3M8N0G6Q5R4S3T2
        workspaceId:
          type: string
        name:
          type: string
        color:
          type: string
      required:
        - id
        - workspaceId
        - name
        - color
      example:
        id: 01HX7K2YV9D3M8N0G6Q5R4S3T2
        workspaceId: 01HX7K2YV9D3M8N0G6Q5R4S3T3
        name: Competitors
        color: gold
    PublicApiValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
        target:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
              code:
                type: string
            required:
              - path
              - message
              - code
      required:
        - message
        - target
        - errors
      example:
        message: Validation failed
        target: query
        errors:
          - path: country
            message: Required
            code: invalid_type
    PublicApiErrorResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      example:
        message: Report not found
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Provide your API key as a Bearer token: `Authorization: Bearer
        YOUR_API_KEY`.

````