Save section content
save_section_contentSave a single section on a page. Only this section changes: the change is applied to the page's draft as one section edit, and sibling sections are never sent back. The section is matched by id or logicalId.
Use this for any edit to one section. Start with get_section_content to read the section, modify the fields you want, then pass the (partial or full) section object back.
Merge semantics (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: send the full array you want, including any items you are keeping. To remove one item, send the array without it. To add one, send the array with it.
section.type must be "Uislice" for regular content sections. The component name (HeroWithMedia, Faqs, etc) goes on uislices[0].type, not on section.type. An embedded header or footer ("Partial") is saved with save_partial_content instead.
A change of an existing section's component type (uislices[0].type, e.g. Faqs -> FaqsOnCard) is refused: use remove_section followed by insert_section with the new type. Script tags, event handlers and script links in content are refused.
Collection-fed items: when a section is bound to a collection, the paths get_section_content lists as collectionFed show the collection's entries and are read-only here; an edit there is refused, so 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.
Icons: a stored svgStr is drawn in place of pqIcon. On section and item icons, setting pqIcon drops the stored svgStr; on a button, menu or social icon send svgStr: null with the new pqIcon. An svgStr reference such as svg:1a2b3c4d from a compact read keeps that icon.
You MUST provide lastVersion for optimistic concurrency: get_section_content returns it as lastVersion, get_page_content as latestRevision.version, and each save returns the next one as revision.version. The save is refused when the page changed since that version was read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageId | Yes | The page ID | |
| section | Yes | The updated section. Its id names the section to change: the section's id or its logicalId (the logicalId stays the same when a draft is forked from the published page; the id does not). Include type and uislices with the ctx and cfg fields you are changing. | |
| projectId | Yes | The project ID | |
| lastVersion | Yes | The current revision version. Required for conflict detection. |