Changes data

quotecloud_replace_pdf_pages

Swap the PDF behind an existing embedded PDF section for a revised file, e.g. a revised drawing. The section keeps its id, name (unless title is given), position, and overlay blocks on pages that still exist; page sizes are re-read from the new PDF and stale previews are cleared. Upload and finalize the new PDF first. Refused with pdf_overlay_blocks_would_be_orphaned if the new PDF drops pages that carry overlay blocks. Retry-safe: if the page already shows this assetId, it returns alreadyReplaced:true without writing. The previous asset stays in storage.

Inputs

documentIdRequired
Convex document ID or company-scoped numeric display ID. string
revisionTokenRequired
Opaque document revisionToken from quotecloud_inspect_structure. string
pageIdRequired
The embedded PDF page id: the pageId returned by quotecloud_insert_pdf_pages, or a sections[].embeddedPdf.pageId from quotecloud_inspect_structure. string
assetIdRequired
Canonical finalized assetId of the replacement PDF. string
titleOptional
Optional new section name. string
lockTokenRequired
Stable opaque token for this agent edit session. Reuse it to heartbeat owned element locks. string