Replace the site's design or pages
replace_siteReplace an existing site's DRAFT. With template_slug: switch it to another template — the owner said 'not my style' and picked another design. The whole draft is replaced (pages, theme, header and footer), so redo the copy and photos for the business afterwards. With fixture: replace everything with a fixture you composed; with page_updates: replace only the listed pages' trees. Saved as a draft — the live URL is unchanged until publish. Share url (the preview) and relay next_step; never say it is live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| theme | No | Optional theme swap. Can be combined with either fixture or page_updates. | |
| fixture | No | Full updated Fixture — replaces all pages and site elements. Provide this OR page_updates, not both. | |
| site_id | Yes | The site UUID returned by create_site_from_template or list_sites. | |
| page_updates | No | Partial update — only the listed pages are changed. Provide this OR fixture, not both. | |
| template_slug | No | Switch the site to this template (a slug from find_templates): its pages, theme and starter items replace the draft, on the SAME site — never build a second site for a switch. Then rewrite the copy and swap the photos for this business again, as after a first build. Do it only on the owner's yes. | |
| expected_draft_updated_at | No | Optional: the draft_updated_at from the get_page (with view: "content") you built this from. If the draft changed since (the owner edited in the editor), the update is refused with stale_fixture instead of overwriting their work. |