---
title: "Bulk Update Documents"
method: PATCH
path: "/v1/collections/{collection_identifier}/documents/bulk"
tags: ["Collection Documents"]
---

# Bulk Update Documents

`PATCH /v1/collections/{collection_identifier}/documents/bulk`

Bulk update documents matching filter conditions.

Partially updates all documents in the collection that match the provided filters.
If no filters are provided, updates all documents in the collection.

This endpoint applies the SAME update_data to ALL documents matching the filters.
For per-document updates with different values, use POST /batch endpoint instead.

## Path parameters

- `collection_identifier` string, required — The ID of the collection to update documents in.

## Request body

- BulkUpdateDocumentsRequest — Request model for bulk updating documents by filters. Updates ALL documents matching the provided filters with the SAME update_data. For updating specific documents by ID or different values per document, use BatchUpdateDocumentsRequest. Use Cases: - Update all pending documents to processed - Update all documents from a specific date range - Apply uniform changes across filtered document sets Requirements: - update_data: REQUIRED - fields to update on all matching documents - filters: OPTIONAL - if omitted, updates ALL documents in collection
  - `filters` LogicalOperatorInput — Represents a logical operation (AND, OR, NOT) on filter conditions. Allows nesting with a defined depth limit. Also supports shorthand syntax where field names can be passed directly as key-value pairs for equality filtering (e.g., {"metadata.title": "value"}).
    - `AND` union[], nullable — Logical AND operation - all conditions must be true
      - union
        - LogicalOperatorInput — recursive
        - FilterCondition — Represents a single filter condition. Attributes: field: The field to filter on operator: The comparison operator value: The value to compare against
          - `field` string, required — Field name to filter on
          - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'contains' | 'starts_with' | 'ends_with' | 'regex' | 'exists' | 'is_null' | 'text' | 'phrase' | 'geo_radius' | 'geo_bounding_box' | 'geo_polygon' — Supported filter operators across database implementations.
          - `value` union, required — Value to compare against
            - DynamicValue — A value that should be dynamically resolved from the query request.
              - …
            - unknown
    - `OR` union[], nullable — Logical OR operation - at least one condition must be true
      - union
        - LogicalOperatorInput — recursive
        - FilterCondition — Represents a single filter condition. Attributes: field: The field to filter on operator: The comparison operator value: The value to compare against
          - `field` string, required — Field name to filter on
          - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'contains' | 'starts_with' | 'ends_with' | 'regex' | 'exists' | 'is_null' | 'text' | 'phrase' | 'geo_radius' | 'geo_bounding_box' | 'geo_polygon' — Supported filter operators across database implementations.
          - `value` union, required — Value to compare against
            - DynamicValue — A value that should be dynamically resolved from the query request.
              - …
            - unknown
    - `NOT` union[], nullable — Logical NOT operation - all conditions must be false
      - union
        - LogicalOperatorInput — recursive
        - FilterCondition — Represents a single filter condition. Attributes: field: The field to filter on operator: The comparison operator value: The value to compare against
          - `field` string, required — Field name to filter on
          - `operator` 'eq' | 'ne' | 'gt' | 'lt' | 'gte' | 'lte' | 'in' | 'nin' | 'contains' | 'starts_with' | 'ends_with' | 'regex' | 'exists' | 'is_null' | 'text' | 'phrase' | 'geo_radius' | 'geo_bounding_box' | 'geo_polygon' — Supported filter operators across database implementations.
          - `value` union, required — Value to compare against
            - DynamicValue — A value that should be dynamically resolved from the query request.
              - …
            - unknown
    - `case_sensitive` boolean, nullable — Whether to perform case-sensitive matching
  - `update_data` object, required — REQUIRED. Dictionary of field-value pairs to update on ALL matching documents. Can update any document field except vectors (metadata, source_blobs, etc.). All matched documents receive the SAME updates. Example: {'metadata.status': 'processed', 'metadata.reviewed': true}

## Response `200`

Successful Response

- BulkUpdateDocumentsResponse — Response model for bulk document update operation. bulk update is ASYNC. A filtered update scrolls matches on the shard and can run far longer than a request should hold a connection (an unindexed filtered scroll scans the whole shard, so 172 matching docs on a shared 6.47M-vector shard exceeded 120s and the client saw a silent no-op). The endpoint now enqueues a task and returns immediately: poll GET /v1/tasks/{task_id} for the terminal status and updated_count.
  - `task_id` string, nullable — Id of the background task running the bulk update. Poll GET /v1/tasks/{task_id} for status and the final updated_count.
  - `status` string, nullable — Task status at enqueue time (PENDING). The terminal status (COMPLETED / FAILED) and updated_count land on the task record.
  - `updated_count` integer, nullable — Number of documents updated. Null on the async enqueue response; populated on the task record when the task completes.
  - `message` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

## Changes

- **2026-08-30** `3775e0b36ee1` — 2 breaking, 3 info
  - the response property `updated_count` became optional for the status `200`
  - response property `updated_count` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - added the optional property `status` to the response with the `200` status
  - added the optional property `task_id` to the response with the `200` status
  - …1 more
- **2026-08-09** `5d4c905106b4` — 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API
- **2026-07-26** `7cb051533311` — 9 info
  - added the new `geo_bounding_box` enum value to the request property `filters/anyOf[subschema #1: LogicalOperator]/AND/anyOf[subschema #1]/items/anyOf[subschema #2: FilterCondition]/operator`
  - added the new `geo_bounding_box` enum value to the request property `filters/anyOf[subschema #1: LogicalOperator]/NOT/anyOf[subschema #1]/items/anyOf[subschema #2: FilterCondition]/operator`
  - added the new `geo_bounding_box` enum value to the request property `filters/anyOf[subschema #1: LogicalOperator]/OR/anyOf[subschema #1]/items/anyOf[subschema #2: FilterCondition]/operator`
  - added the new `geo_polygon` enum value to the request property `filters/anyOf[subschema #1: LogicalOperator]/AND/anyOf[subschema #1]/items/anyOf[subschema #2: FilterCondition]/operator`
  - …5 more

[Change history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/collections/:collection_identifier/documents/bulk/patch.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) · [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mixpeek/mixpeek-api/revisions/daf60765b81d/schema)
