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

# Patch Multiple Items

> Update multiple items simultaneously based on filter criteria.

<Card title="Error Reference: Content Controls" icon="triangle-exclamation" href="/api-reference/general/errors#content-controls-data-engine">
  Common errors: missing patch operations (400), publisher not found (400), validation errors (422), bulk patch failure (500).
</Card>


## OpenAPI

````yaml patch /engine/v2/items
openapi: 3.1.0
info:
  title: AI API
  description: |-
    Optimized for high-speed inference and scalability by Gloo AI

    [Swagger UI](./docs) | [ReDoc UI](./redoc)
  version: 1.0.0
servers:
  - url: https://platform.ai.gloo.com
security:
  - bearerAuth: []
tags:
  - name: Content Controls
  - name: Data Engine
  - name: Ingestion & Enrichment
  - name: answers
  - name: chat
  - name: completions
  - name: content
  - name: core
  - name: data
  - name: get-models
  - name: ingestion
  - name: sotc
paths:
  /engine/v2/items:
    patch:
      tags:
        - Data Engine
        - Content Controls
      summary: Patch Multiple Items
      description: Update multiple items simultaneously based on filter criteria.
      operationId: patch_multiple_items_engine_v2_items_patch
      parameters:
        - name: publisher_id
          in: query
          required: true
          schema:
            type: string
            format: uuid
            title: Publisher Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MultiItemPatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MultiItemPatchResponse'
        '400':
          description: Bad Request - Publisher not found or invalid patch request
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              examples:
                publisher_not_found:
                  summary: Publisher not found
                  value:
                    detail:
                      code: publisher_not_found
                      message: Publisher not found
                missing_patch_operations:
                  summary: No patch operations provided
                  value:
                    detail:
                      code: Invalid request
                      message: At least one patch operation is required
        '403':
          description: Forbidden - Publisher access denied
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              example:
                detail:
                  message: Publisher does not belong to your organization
                  code: PUBLISHER_ACCESS_DENIED
        '404':
          description: Publisher not found
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              example:
                detail:
                  message: >-
                    Publisher not found. The specified publisher ID does not
                    exist.
                  code: PUBLISHER_NOT_FOUND
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error - Bulk patch operation failed
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              example:
                detail:
                  code: Internal server error
                  message: An error occurred during bulk patch operation
      security:
        - HTTPBearer: []
components:
  schemas:
    MultiItemPatchRequest:
      properties:
        filter:
          $ref: '#/components/schemas/MultiItemPatchFilter'
        ops:
          items:
            $ref: '#/components/schemas/PatchOperation'
          type: array
          minItems: 1
          title: Ops
        limit:
          default: 100
          maximum: 10000
          minimum: 1
          type: integer
          title: Limit
      type: object
      required:
        - filter
        - ops
      title: MultiItemPatchRequest
    MultiItemPatchResponse:
      properties:
        success:
          type: boolean
          title: Success
        total_matched:
          type: integer
          title: Total Matched
        total_patched:
          type: integer
          title: Total Patched
        total_failed:
          type: integer
          title: Total Failed
        results:
          items:
            $ref: '#/components/schemas/ItemPatchResult'
          type: array
          title: Results
        message:
          type: string
          title: Message
        filter_applied:
          $ref: '#/components/schemas/MultiItemPatchFilter'
      type: object
      required:
        - success
        - total_matched
        - total_patched
        - total_failed
        - results
        - message
        - filter_applied
      title: MultiItemPatchResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MultiItemPatchFilter:
      properties:
        item_ids:
          items:
            type: string
          type: array
          title: Item Ids
        types:
          items:
            type: string
          type: array
          title: Types
        statuses:
          items:
            type: string
          type: array
          title: Statuses
        authors:
          items:
            type: string
          type: array
          title: Authors
        tags:
          items:
            type: string
          type: array
          title: Tags
        evergreen:
          type: boolean
          title: Evergreen
        visible_in_search:
          type: boolean
          title: Visible In Search
        visible_in_chat:
          type: boolean
          title: Visible In Chat
        search:
          type: string
          title: Search
        created_after:
          type: string
          title: Created After
        created_before:
          type: string
          title: Created Before
        updated_after:
          type: string
          title: Updated After
        updated_before:
          type: string
          title: Updated Before
      type: object
      title: MultiItemPatchFilter
    PatchOperation:
      properties:
        op:
          type: string
          enum:
            - replace
            - append
            - remove
          title: Op
        field:
          type: string
          title: Field
        value:
          title: Value
      type: object
      required:
        - op
        - field
      title: PatchOperation
    ItemPatchResult:
      properties:
        item_id:
          type: string
          format: uuid
          title: Item Id
        success:
          type: boolean
          title: Success
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        etag:
          type: string
          title: ETag
        updated_at:
          type: string
          title: Updated At
      type: object
      required:
        - item_id
        - success
      title: ItemPatchResult
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer `<token>`, where
        `<token>` is your [auth token](/studio/manage-api-credentials).
    HTTPBearer:
      type: http
      scheme: bearer

````