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

# Bulk store (upsert) tags

> Create or update multiple tags. Parent categories must exist.



## OpenAPI

````yaml /openapi/em-runtime-utils-v2.yaml post /utils/metadata/tags/store
openapi: 3.1.0
info:
  title: em_runtime_utils
  version: 5.27.0
servers: []
security: []
paths:
  /utils/metadata/tags/store:
    post:
      tags:
        - metadata
      summary: Bulk store (upsert) tags
      description: Create or update multiple tags. Parent categories must exist.
      operationId: bulk_store_tags
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkStoreTagRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkStoreTagResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    BulkStoreTagRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/CatalogTagCreateRequest'
          type: array
          maxItems: 100
          minItems: 1
          title: Items
      type: object
      required:
        - items
      title: BulkStoreTagRequest
      description: Request body for bulk store (upsert) tags.
    BulkStoreTagResponse:
      properties:
        items:
          items:
            $ref: '#/components/schemas/BulkStoreTagItemResult'
          type: array
          title: Items
        errors:
          items:
            $ref: '#/components/schemas/MetadataItemError'
          type: array
          title: Errors
      type: object
      required:
        - items
        - errors
      title: BulkStoreTagResponse
      description: Response for bulk store tags.
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      type: object
      required:
        - error
      title: ErrorResponse
      description: Standard error response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CatalogTagCreateRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Tag name (e.g., 'Email', 'High')
        fully_qualified_name:
          type: string
          maxLength: 512
          minLength: 3
          title: Fully Qualified Name
          description: Two-segment FQN in Category.Tag format (e.g., 'PII.Email')
        description:
          anyOf:
            - type: string
              maxLength: 2000
            - type: 'null'
          title: Description
          description: Optional tag description
        style:
          anyOf:
            - $ref: '#/components/schemas/TagStyle'
            - type: 'null'
          description: Visual styling (color, icon)
        owners:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Owners
          description: Ownership information
      type: object
      required:
        - name
        - fully_qualified_name
      title: CatalogTagCreateRequest
      description: Request body for creating a catalog tag.
      example:
        description: Data containing email addresses
        fully_qualified_name: PII.Email
        name: Email
        style:
          color: '#FF6B6B'
          icon: mail
    BulkStoreTagItemResult:
      properties:
        fqn:
          type: string
          title: Fqn
        message:
          type: string
          title: Message
      type: object
      required:
        - fqn
        - message
      title: BulkStoreTagItemResult
      description: Per-item result in bulk store response.
    MetadataItemError:
      properties:
        fqn:
          type: string
          title: Fqn
        error_code:
          $ref: '#/components/schemas/MetadataErrorCode'
        detail:
          type: string
          title: Detail
      type: object
      required:
        - fqn
        - error_code
        - detail
      title: MetadataItemError
      description: Per-item error in bulk operation responses.
    ErrorBody:
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          title: Message
        details:
          additionalProperties: true
          type: object
          title: Details
        request_id:
          type: string
          title: Request Id
        timestamp:
          type: string
          format: date-time
          title: Timestamp
      type: object
      required:
        - code
        - message
        - request_id
        - timestamp
      title: ErrorBody
      description: Error body with structured details.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    TagStyle:
      properties:
        color:
          anyOf:
            - type: string
              maxLength: 50
            - type: 'null'
          title: Color
          description: Tag color (e.g., '#FF0000', 'red')
        icon:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Icon
          description: Tag icon identifier
      type: object
      title: TagStyle
      description: Visual styling for a tag.
    MetadataErrorCode:
      type: string
      enum:
        - not_found
        - permission_denied
        - validation_error
      title: MetadataErrorCode
      description: Error codes for per-item errors in bulk operations.
    ErrorCode:
      type: string
      enum:
        - INVALID_REQUEST
        - INVALID_TOKEN
        - INSUFFICIENT_PERMISSIONS
        - RESOURCE_NOT_FOUND
        - RESOURCE_ALREADY_EXISTS
        - VALIDATION_ERROR
        - RATE_LIMIT_EXCEEDED
        - SERVICE_UNAVAILABLE
        - INTERNAL_ERROR
      title: ErrorCode
      description: Standard error codes for API responses.
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````