Craft icon

Craft

Interact with your Craft documents via the API

Block → Update Blocks

AI-generated

Summary

Update multiple blocks in Craft documents by specifying an array of block objects with their IDs and desired field changes.

Inputs

  • Blocks (required) — An array of block update objects, each containing the ID of the block to update and the fields you want to change within that block.

Output shape

a list of the updated block objects or error objects for each update attempt, each paired with the corresponding input item.

The operation processes an array of updates and returns an array of results matching the input order. On failure of an individual update, the error message is included in the corresponding result if 'continue on fail' is enabled; otherwise, the execution stops with an error.

Discussion