Changes data

quotecloud_replace_image

Replace or clear an imageBlock or galleryBlock cell. Upload/import the image first with quotecloud_import_document_asset or quotecloud_finalize_document_asset_upload and pass its assetId as image; null clears it. Address by blockLinkId (API Link ID, e.g. customer_logo or cover_render) or blockId. Use revisionToken from quotecloud_inspect_structure for either contentMode, or blockId + expectedRevision for fine_grained only; supply exactly one revision family. cellId is optional for a single cell. Logos: layout {fit:"contain", focalPoint:{x:0.5,y:0.5}}. Renders/photos in a gallery cell: {fit:"cover", focalPoint:{x:0.5,y:0.5}} with optional zoom (1..3). A single-image block always renders the whole image, so fit "cover" there returns a fit_not_applied warning; frame it with focalPoint + zoom. Express crop through focalPoint + zoom; omitted layout fields keep their current values. Retry-safe: an unchanged assignment returns alreadyApplied without writing. Sent documents are refused read-only. A changed write invalidates the stored PDF. Verify with quotecloud_get_block_image, then quotecloud_generate_document_pdf and quotecloud_get_page_preview.

Inputs

documentIdRequired
Convex document ID or company-scoped numeric display ID. string
blockIdOptional
The block id reported by quotecloud_inspect_structure. Supply this or blockLinkId, not both. string
blockLinkIdOptional
The block’s API Link ID (BlockData.apiLinkId), the short handle set in the editor. Supply this or blockId, not both; a link id shared by several blocks is refused as ambiguous. string
revisionTokenOptional
Document revisionToken from quotecloud_inspect_structure. Selects the normalized argument family, which works in either contentMode; the write is refused with a *_revision_conflict if the document moved since it was read. string
expectedRevisionOptional
number
imageRequired
string
cellIdOptional
string
layoutOptional
object
lockTokenRequired
Stable opaque token for this agent edit session. Reuse it to heartbeat owned element locks. string