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

# Delete tag

> Delete a tag. The tag is soft-deleted (status='DELETED') and removed from all
associated resources. Creating a new tag with the same name will reactivate
this record.




## OpenAPI

````yaml /api-reference/v1/tags-v1.yaml delete /tags/{tag_id}
openapi: 3.0.3
info:
  title: Coval Tags API
  version: 1.0.0
  description: >

    Manage tags for organizing agents, personas, test sets, metrics, and run
    templates.
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
    description: Production API
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: CRUD operations for resource tags
paths:
  /tags/{tag_id}:
    delete:
      tags:
        - Tags
      summary: Delete tag
      description: >
        Delete a tag. The tag is soft-deleted (status='DELETED') and removed
        from all

        associated resources. Creating a new tag with the same name will
        reactivate

        this record.
      operationId: deleteTag
      parameters:
        - name: tag_id
          in: path
          required: true
          schema:
            type: string
          description: Tag resource ID
          example: 01HX2ABC3DEF4GHI5JKL6MNO7P
      responses:
        '200':
          description: Tag deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteTagResponse'
              examples:
                deleted:
                  $ref: '#/components/examples/TagDeleted'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/PermissionDenied'
        '404':
          description: Tag not found or belongs to different organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  $ref: '#/components/examples/TagNotFoundError'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    DeleteTagResponse:
      type: object
      required:
        - tag
      properties:
        tag:
          $ref: '#/components/schemas/TagResource'
    ErrorResponse:
      type: object
      description: Standard error response
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              description: Error code enum
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - PERMISSION_DENIED
                - NOT_FOUND
                - ALREADY_EXISTS
                - INTERNAL
              example: INVALID_ARGUMENT
            message:
              type: string
              description: Human-readable error message
              example: Invalid request parameter
            details:
              type: array
              description: Detailed error information
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                    description: Field name that caused the error
                    example: tag_name
                  description:
                    type: string
                    description: Detailed error description
                    example: tag_name cannot be empty
    TagResource:
      type: object
      description: >-
        Tag resource. Tags are used to organize agents, personas, test sets,
        metrics, and run templates.
      properties:
        name:
          type: string
          description: Resource name in format "tags/{tag_id}"
          example: tags/01HX2ABC3DEF4GHI5JKL6MNO7P
        id:
          type: string
          description: Tag resource ID
          example: 01HX2ABC3DEF4GHI5JKL6MNO7P
        tag_name:
          type: string
          description: Lowercase tag display name
          example: production
        color:
          type: string
          nullable: true
          description: Hex color code (#RGB,
          example: '#3b82f6'
        create_time:
          type: string
          format: date-time
          description: Creation timestamp (ISO 8601)
          example: '2025-10-14T12:00:00Z'
        created_by:
          type: string
          nullable: true
          description: Email of the user who created the tag
          example: engineer@example.com
  examples:
    TagDeleted:
      summary: Tag deleted successfully
      value:
        tag:
          name: tags/01HX2ABC3DEF4GHI5JKL6MNO7P
          id: 01HX2ABC3DEF4GHI5JKL6MNO7P
          tag_name: production
          color: '#3b82f6'
          create_time: '2025-10-14T12:00:00Z'
          created_by: engineer@example.com
    TagNotFoundError:
      summary: Tag not found
      value:
        error:
          code: NOT_FOUND
          message: Tag not found
          details:
            - field: tag_id
              description: Tag not found or not accessible by your organization
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    PermissionDenied:
      description: API key lacks required permission scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: PERMISSION_DENIED
              message: Insufficient permissions
              details:
                - field: permissions
                  description: 'API key does not have required permission: tags:write'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````