Save partial content
save_partial_contentSave sections to a partial (header, footer, or other reusable section). Replaces the partial's sections list with the provided sections (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. Sections are matched by id or logicalId.
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.
section.type must be "Uislice" for regular content sections or "Partial" for embedded partials. The component name (HeaderWithMenu, SimpleFooter, etc) goes on uislices[0].type. A new section needs both props.ctx and props.cfg (get_section_defaults gives both) and a type from list_section_types.
Refused instead of silently dropped: a change of an existing section's component type (save the partial without it, then with the new section), a section that keeps a logicalId but is no longer on the partial (read it again), and script tags, event handlers or script links in content.
You MUST provide lastVersion from get_partial_content latestRevision.version for optimistic concurrency. The result carries the new latestRevision with its headAnchor for publish_partial.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sections | Yes | Complete list of sections on the partial. Replaces existing sections wholesale. | |
| partialId | Yes | The partial ID | |
| projectId | Yes | The project ID | |
| lastVersion | Yes | The current revision version from get_partial_content latestRevision.version. Required for conflict detection. |