v5

latestOpenAPI 3.1.02026-08-025631,1012.8 MB
Collection Documents

Batch Update Documents

Batch update multiple documents by explicit IDs or filters.

Supports TWO modes:

  1. Explicit IDs mode: Provide 'updates' array with document_id + update_data for each document

    • Each document can have DIFFERENT update_data
    • Returns detailed per-document results
  2. Filter mode: Provide 'filters' + 'update_data' to update all matching documents

    • All documents receive the SAME update_data
    • Returns total count only

Key Features:

  • Update any document field except vectors (metadata, internal_metadata, source_blobs, etc.)
  • Maximum 1000 documents per batch in explicit mode
  • Per-document success/failure reporting in explicit mode
  • Validates documents exist in the specified collection

Examples: Explicit IDs mode: json { "updates": [ {"document_id": "doc_123", "update_data": {"metadata": {"status": "processed"}}}, {"document_id": "doc_456", "update_data": {"metadata": {"status": "archived"}}} ] }

Filter mode (logical AND/OR/NOT shape — NOT MVS-native must/key):
```json
{
    "filters": {"AND": [{"field": "metadata.status", "operator": "eq", "value": "pending"}]},
    "update_data": {"metadata": {"status": "processed"}}
}
```
post/v1/collections/{collection_identifier}/documents/batch

Path parameters

collection_identifierstring required

The ID of the collection to update documents in.

The ID of the collection to update documents in.

Request body

update_dataobject nullable

OPTIONAL. Update data to apply when using filters mode. Must be used with 'filters' field. All matched documents receive the same updates. Can update any document field except vectors.

Example request

{
  "description": "Explicit IDs mode: Update 3 documents with different values",
  "updates": [
    {
      "document_id": "doc_frame_001",
      "update_data": {
        "metadata": {
          "quality_score": 0.95,
          "reviewed": true
        }
      }
    },
    {
      "document_id": "doc_frame_002",
      "update_data": {
        "metadata": {
          "flagged": true,
          "quality_score": 0.87
        }
      }
    },
    {
      "document_id": "doc_frame_003",
      "update_data": {
        "metadata": {
          "discarded": true,
          "quality_score": 0.72
        }
      }
    }
  ]
}

Response

Successful Response

updated_countinteger required

Total number of documents successfully updated

failed_countinteger

Total number of documents that failed to update

messagestring

Summary message of the operation

Example response

{
  "failed_count": 0,
  "message": "Successfully updated 3 document(s)",
  "results": [
    {
      "document_id": "doc_123",
      "success": true
    },
    {
      "document_id": "doc_456",
      "success": true
    },
    {
      "document_id": "doc_789",
      "success": true
    }
  ],
  "updated_count": 3
}