Create or Update Chunk Relations in Batches

Create or update up to 100 chunk relations in one request. A relation is identified by its source chunk, target chunk, and `relation_type`. When no relation with that identity exists, one is created and the item returns 201. When exactly one exists, it keeps its `relation_id` and its entire `metadata` object is replaced: keys omitted from the item are removed, and `{}` clears the metadata. Relations not named in the request are left unchanged. This differs from [Create Chunk Relation](/reference/v3/documents/chunk/relations/create), which always creates and can therefore produce duplicate relations; when more than one existing relation matches an item's identity, the batch changes nothing and fails that item with 409 `relation_identity_ambiguous`. Returns 200 with one result per item, in order. Envelope, partial success, and `unknown` outcomes are covered in the [Batch Metadata & Relations](/guides/batch-writes) guide.

Path parameters

collection_namestringRequired

Request

This endpoint expects an object.
itemslist of objectsRequired

1 to 100 items. The request body may not exceed 1 MiB of UTF-8 JSON.

Response

Create or Update Chunk Relations in Batches response.
resultslist of objects
One result per request item, in request order. Never empty for an accepted batch.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
413
Content Too Large Error
© 2026 Captain