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

# Create a tag ahead of any link — the colour may be chosen

> Requires a token with the `links:write` permission.



## OpenAPI

````yaml /openapi.json post /api/v1/tags
openapi: 3.0.0
info:
  description: >-
    Every request carries `Authorization: Bearer utmk_…`. The token fixes the
    workspace; no request names one. Every operation declares `x-permission`,
    the token permission it requires.
  title: UTM Builder API
  version: '1'
servers:
  - url: https://app.utmkit.co
    variables: {}
security:
  - bearer: []
tags: []
paths:
  /api/v1/tags:
    post:
      tags:
        - tags
      summary: Create a tag ahead of any link — the colour may be chosen
      description: Requires a token with the `links:write` permission.
      operationId: UtmBuilderWeb.API.V1.TagController.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TagInput'
        description: Tag input
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
          description: Tag
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error
      callbacks: {}
components:
  schemas:
    TagInput:
      properties:
        color:
          enum:
            - gray
            - red
            - orange
            - amber
            - green
            - teal
            - blue
            - purple
          type: string
        name:
          type: string
      required:
        - name
      title: TagInput
      type: object
    Tag:
      properties:
        color:
          type: string
        created_at:
          format: date-time
          type: string
        id:
          type: integer
        link_count:
          type: integer
        name:
          type: string
      title: Tag
      type: object
    Error:
      description: Every refusal. `code` is the closed set of FR-019.
      properties:
        error:
          properties:
            code:
              enum:
                - unauthenticated
                - subscription_required
                - subscription_ended
                - missing_permission
                - role_forbids
                - plan_forbids
                - rate_limited
                - governance_refused
                - scanner_refused
                - limit_reached
                - duplicate_link
                - not_found
                - invalid_input
              type: string
            details:
              additionalProperties: true
              description: field → messages, on invalid_input
              nullable: true
              type: object
            message:
              type: string
            permission:
              nullable: true
              type: string
            retry_after_seconds:
              nullable: true
              type: integer
          required:
            - code
            - message
          type: object
      required:
        - error
      title: Error
      type: object
  securitySchemes:
    bearer:
      description: utmk_<lookup><secret>, minted on /tokens
      scheme: bearer
      type: http

````