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

# Change Asset Tags

> Atomically add and remove tags on up to 100 assets. Optional per-asset `expect` preconditions fail the whole batch with 409 when memberships have changed.



## OpenAPI

````yaml /api/openapi.yaml post /v1/tags/assets/changes
openapi: 3.0.3
info:
  title: Documentation Service API
  description: API documentation for Documentation Service
  version: 1.0.0
servers:
  - url: https://api.us.lexful.app
    description: US pod
security:
  - bearerAuth: []
paths:
  /v1/tags/assets/changes:
    post:
      tags:
        - Tags
      summary: Change Asset Tags
      description: >-
        Atomically add and remove tags on up to 100 assets. Optional per-asset
        `expect` preconditions fail the whole batch with 409 when memberships
        have changed.
      parameters:
        - in: header
          name: X-Account-ID
          required: true
          schema:
            type: string
            format: uuid
          description: Account ID
      requestBody:
        $ref: '#/components/requestBodies/post_v1_tags_assets_changes_request'
      responses:
        '200':
          $ref: '#/components/responses/ChangeAssetTagsResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '409':
          $ref: '#/components/responses/ConflictResponse'
        '500':
          $ref: '#/components/responses/InternalServerErrorResponse'
components:
  requestBodies:
    post_v1_tags_assets_changes_request:
      required: true
      content:
        application/json:
          schema:
            $ref: >-
              #/components/schemas/post_v1_tags_assets_changes_request_application_json
  responses:
    ChangeAssetTagsResponse:
      description: Default Response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ChangeAssetTagsResponse_application_json'
    BadRequestResponse:
      description: Bad request - validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ForbiddenResponse:
      description: Forbidden - insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundResponse:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ConflictResponse:
      description: Conflict - resource already exists
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerErrorResponse:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    post_v1_tags_assets_changes_request_application_json:
      type: object
      required:
        - changes
      properties:
        operation:
          type: string
          enum:
            - add
            - move
            - undo
          description: Recorded in audit events only
        changes:
          type: array
          minItems: 1
          maxItems: 100
          items:
            $ref: >-
              #/components/schemas/post_v1_tags_assets_changes_request_application_json_changes_items
    ChangeAssetTagsResponse_application_json:
      type: object
      properties:
        operation_id:
          type: string
          format: uuid
        changes:
          type: array
          items:
            $ref: >-
              #/components/schemas/ChangeAssetTagsResponse_application_json_changes_items
    ErrorResponse:
      description: Bad request - validation error
      type: object
      properties:
        status:
          type: number
          description: HTTP status code
        message:
          type: string
          description: Error message
        error_id:
          type: string
          description: Unique error identifier
        error_code:
          type: string
          description: Error code
        developer_message:
          type: string
          description: Additional details for developers
    post_v1_tags_assets_changes_request_application_json_changes_items:
      type: object
      required:
        - asset_id
      additionalProperties: false
      properties:
        asset_id:
          type: string
          format: uuid
        add:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 100
        remove:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 100
        expect:
          $ref: >-
            #/components/schemas/post_v1_tags_assets_changes_request_application_json_changes_items_expect
    ChangeAssetTagsResponse_application_json_changes_items:
      type: object
      properties:
        asset_id:
          type: string
          format: uuid
        added:
          type: array
          items:
            type: string
            format: uuid
        removed:
          type: array
          items:
            type: string
            format: uuid
    post_v1_tags_assets_changes_request_application_json_changes_items_expect:
      type: object
      additionalProperties: false
      properties:
        has:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 100
        lacks:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 100
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.