Edit a design's copy without touching code
patch_variation_contentMerge a JSON patch into a design variation's content — headlines, prices, FAQ answers, image URLs, link targets. Because content and code are separate, most refinements are pure content edits and need no code change at all. Merge semantics: objects recurse (so patching content.hero.headline keeps hero.subhead), null deletes a key, everything else replaces. Validated against the code's references before writing — removing a key the code reads is rejected rather than silently blanking a section. Prefer this over refine_site for any copy change: it is instant and needs no AI round-trip. The edit is recorded in version history (version in the response) and can be undone with restore_version; a history_warning means it saved but was not recorded. Omit index to patch the active design. NOTE: form definitions (forms, modalForms) are site-global — a form id the site already defines is ONE definition shared by every design, so editing it applies site-wide regardless of index, and the response echoes the key in site_global_keys so you can say so rather than reporting a per-design change. Send the full edited form entry (same id); new form ids stay with this design. PAGE DRAFTS: a draft's text lives under its own content_key (from create_page_draft / list_page_drafts) — patch ONLY that key, with the draft's design index, to change the draft without touching the live page. Patching the live page's keys (hero, page_about, …) changes the live site.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Variation index from list_variations. Defaults to the active design. | |
| patch | Yes | Content keys to merge, e.g. { "pricing": { "monthly": "$29" } } | |
| site_id | Yes | The site to patch | |
| user_goal | No | Optional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details. | |
| expected_row_version | No | The `row_version` read_design returned. The edit is refused with a conflict if the design changed since. Required to remove live menu links (navigation/footer). |