Skip to main content
PATCH
/
v1
/
collections
/
{collection_identifier}
/
documents
/
bulk
Bulk Update Documents
curl --request PATCH \
  --url https://api.mixpeek.com/v1/collections/{collection_identifier}/documents/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "update_data": {},
  "filters": {
    "AND": [
      {
        "field": "metadata.status",
        "operator": "eq",
        "value": "pending"
      }
    ]
  }
}
'
{
  "updated_count": 123,
  "message": "Documents updated successfully"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

collection_identifier
string
required

The ID of the collection to update documents in.

Body

application/json

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

update_data
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}

Examples:
{
"metadata": { "reviewed": true, "status": "processed" }
}
{ "metadata.processing_complete": true }
filters
LogicalOperator · object | null

OPTIONAL. Filter conditions to match documents for update. If not provided, updates ALL documents in the collection. Uses the logical AND/OR/NOT shape — a list of {field, operator, value} conditions (operators: eq, ne, in, nin, gt, gte, lt, lte, contains, exists, …). The MVS-native {'must': [{'key': ...}]} shape is NOT accepted here. Example: {'AND': [{'field': 'metadata.status', 'operator': 'eq', 'value': 'pending'}]}

Example:
{
"AND": [
{
"field": "metadata.status",
"operator": "eq",
"value": "pending"
}
]
}

Response

Successful Response

Response model for bulk document update operation.

updated_count
integer
required

Number of documents that were updated.

message
string
default:Documents updated successfully