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

> Create a new tag or update an existing one. Use when managing the tag vocabulary your agents apply — e.g. when syncing a taxonomy from a CRM.

# Create or update a tag



## OpenAPI

````yaml put /tags
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /tags:
    put:
      summary: Create or update a tag
      description: >-
        Create a new tag or update an existing one. If a tag with this name
        already exists, it will be updated. Use exclude_from_auto_tagging to
        prevent the AI from auto-applying this tag.
      operationId: upsertTag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertTagInputDto'
      responses:
        '200':
          description: Default Response
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    UpsertTagInputDto:
      $schema: https://json-schema.org/draft/2020-12/schema
      $id: '#/components/schemas/UpsertTagInputDtoInput'
      type: object
      properties:
        tag_name:
          type: string
          minLength: 1
          description: Tag name (e.g. "billing", "refund", "feature-request")
        description:
          description: Short description of what this tag means (max 160 chars)
          anyOf:
            - type: string
              maxLength: 160
            - type: 'null'
        exclude_from_auto_tagging:
          description: 'If true, the AI will never auto-apply this tag (default: false)'
          type: boolean
        category_id:
          description: >-
            Assign the tag to a category (uuid), null to clear, omit to leave
            unchanged
          anyOf:
            - 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)$
            - type: 'null'
      required:
        - tag_name
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````