Save page content
save_page_contentSave sections to a page. Replaces the page's sections list with the provided sections (section-level add/remove/reorder happens here; a section you leave out is removed explicitly, on every project), but within each matching section, cfg and ctx are merged against the server's current state.
Each section has: id (uuid), name, type ("Uislice" for regular content sections, "Partial" for embedded partials), and uislices array. Each uislice has: id (uuid), type (the component name like HeroWithMedia, Faqs), collectionId (optional), and props with ctx (content) and cfg (layout config).
Common uislice component types (uislices[0].type): HeroWithMedia, HeroWithMediaBelow, StickyFeatures, StickyFeaturesCard, HowItWorks, Faqs, FaqsOnCard, SimpleForm, PqPricing, CardWithMedia, TextGrid, LogoGrid, MediaBentoCards, TestimonialGrid.
Merge semantics for cfg and ctx within each section (RFC 7396 JSON Merge Patch):
Fields you send override the server's values.
Fields you omit are preserved unchanged.
To explicitly clear a field, send it as null.
Arrays (ctas, items, media, icons, menu, social, legal) are REPLACED wholesale.
Sections are matched by id or logicalId. A section that keeps a logicalId but matches nothing is refused with a request to read the page again. A new section needs both props.ctx and props.cfg: call get_section_defaults first to get properly structured defaults, then change text values (title.value, desc.value, CTA labels/urls, media src/alt) while preserving structure.
Refused instead of silently dropped: a change to an embedded header or footer's content (save it with save_partial_content; a "Partial" section may be sent with an empty uislices list to keep it in place), a change of an existing section's component type (use remove_section then insert_section), an unknown section type, and script tags, event handlers or script links in content. Items a section draws from a collection are kept as stored; change the entries with update_entry or save_entry_content. If a page draft stops loading after a save, undo that save with revert_page_revision_to_version (get_page_revisions lists the save numbers), not revert_page_revision.
You MUST provide lastVersion from get_page_content latestRevision.version for optimistic concurrency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | The page ID | |
| sections | Yes | Complete list of sections. Replaces existing sections wholesale. Call get_section_defaults to get the correct shape for each section type. | |
| projectId | Yes | The project ID | |
| lastVersion | Yes | The current revision version (from get_page_content latestRevision.version). Required for conflict detection. |