Minerva API
API referenceDocuments

Update metadata on many documents

PATCH/documents/metadata

Merges metadata values onto up to 100 documents in one call, with the same per-document semantics as PATCH /documents/{id}. All-or-nothing: an unknown or inactive fieldId (422, details.fieldIds) or a missing document (404, details.documentIds) refuses the whole batch and nothing is written.

Requires an API key with one of these roles: admin, editor.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key created in Settings → API Keys.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/documents/metadata" \  -H "Content-Type: application/json" \  -d '{    "updates": [      {        "documentId": "4704590c-004e-410d-adf7-acb7ca0a7052",        "metadata": [          {            "fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",            "value": "string"          }        ]      }    ]  }'
{  "data": {    "updatedCount": 0  },  "meta": {    "requestId": "string",    "timestamp": "string"  }}