/v1/records/{id}/metadataREAD / WRITEUpdate metadata
Replaces a record's stored metadata wholesale. Not a merge.
The request body replaces the record's stored metadata wholesale — this is not a merge. Any key not present in the new body is gone after this call, even if it existed before.
For example, if record 42 currently has metadata
{ "source": "a", "page": 3 } and you PATCH with { "source": "b" },
the result is { "source": "b" } — page is not preserved. To add a
field without losing existing ones, fetch the current metadata with
Get a record first, merge client-side, then
send the full merged object.
The vector itself is untouched — only metadata changes. The change is committed to the BLAKE3 audit chain like any other write.
Parameters
idintegerrequiredRecord id (path parameter).
collectionstringoptionalCollection the record belongs to (query parameter). Optional at the HTTP level — pass it explicitly.
Request body
The request body is the new metadata object — any JSON object, with
no fixed schema (additionalProperties is open). There is no wrapper
field; the body you send becomes the record's metadata exactly.
Response fields
okbooleanrequiredtrue on success.
idintegerrequiredThe record's id.
Errors
| Status | code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
403 | forbidden | The key's scope doesn't include read_write. |
404 | record_not_found | No such record in this collection. |
500 | internal_error | Commit or audit-chain failure. |