update_page
Validate and save edits to an existing page. Dry-run caches the source for preview; set dry_run=false to apply changes, or reuse a draft ID to retry without resending data.
Instructions
Overwrites an EXISTING page's source with an edited tree (source-only; re-render in the editor for preview/publish). Validates first. DEFAULTS to dry_run=true (validates, caches the source as draft_id, previews the request, token masked); dry_run=false to actually save. Accepts draft_id from a previous call (dry_run, or a timed-out/failed update) — re-runs from the cached source without re-sending the full JSON. Needs WEBCAKE_API_BASE + WEBCAKE_JWT.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | The edited page source { page, popup, settings, options, cartConfigs } (object or JSON string). Required unless draft_id is given. The compacted tree from get_page can be edited and sent back AS-IS — sparse nodes are re-hydrated from factory defaults (a full tree also works). | |
| dry_run | No | Default TRUE — validate, cache the source as draft_id, and preview without sending. Set false to actually save. | |
| page_id | No | The page id to update (must be owned by the account). Required unless draft_id is given (the page_id is stored in the draft). | |
| draft_id | No | A draft_id from a previous update_page call (dry_run=true or a timed-out/failed update). Loads the cached source — no need to re-send the full JSON. Use for dry-run → real call transitions and retrying after a timeout. |