update_block_content
Update a block's content on a page. Default merge; replace mode overwrites fully. Works for content and layout blocks.
Instructions
Update a specific block's content on a page. Defaults to merging with existing content; pass mode: 'replace' to overwrite the block's whole content. Works for content and layout blocks. Only call after the user confirms. If the result includes blockWarnings, the saved content violates the workspace block manifest (unknown block type, unknown field or wrong value shape) - correct the content and save again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'merge' (default) shallow-merges the given content per language into what's already there. 'replace' sets the block's entire content to exactly what you provide, dropping any language or field you don't include - use it to fix legacy/malformed content (e.g. a repeater stored as an object instead of an array). | |
| pageId | No | Page id | |
| target | No | 'draft' (default) edits the shared page draft. 'devDraft' edits YOUR per-user dev draft overlay (owned by the token's user; starts from the current page blocks when no overlay exists) - for block types not deployed yet; promote with promote_dev_draft. | |
| blockId | No | Block instance id (UUID) to update | |
| content | No | Content keyed by language, e.g. { en: { title: 'New Title' } }. In 'merge' mode only the given fields change; in 'replace' mode this becomes the block's entire content. A relation field stores record id(s) from list_records - a single id string (hasOne) or an array of id strings (hasMany); the delivery API resolves them to records at render time. A relation field with mode 'all' stores no value. | |
| settings | No |