--- url: https://docs.youcan.shop/store-admin/pages/builder/update.md --- # Update a builder page Endpoint: `https://api.youcan.shop/pages/{id}/builder` Method: `PUT` Replaces the content of a page builder page. The change is live at once when the page is visible. Use [Preview a builder page](/store-admin/pages/builder/preview) to check it first. ## Required Scopes * `edit-pages` ## Parameters | Param Name | Param Type | Description | Required | |------------|------------|----------------------------------------------------------------------------------------------|----------| | `settings` | object | Page settings. When you do not send it, the current settings stay | no | | `sections` | array | The full list of sections. When you do not send it, the current sections stay | no | `sections` replaces the whole list. Read the page with [Get a builder page](/store-admin/pages/builder/get) first, and send every section back with its `id`, changed or not. * A section that you send back unchanged (same `id`, `blocks` and `children`) is kept as it is, including `custom-css-js` and scripts that the seller added in the editor. * A section that you change follows the API rules: no scripts, no `custom-css-js`, and a scroll target must be the `id` of a section on the page. ## Response \[200] The response is the page after the change, with two more keys: * `previous`: the `settings` and `sections` before the change. Send them back to this endpoint to restore the page. * `ignored`: the paths of values that were not applied. ```json { "id": "8b6d1a24-5c4e-4a5f-9d1e-0f2c3b4a5d6e", "name": "Summer collection", "slug": "summer-collection", "visibility": "1", "public_url": null, "type": "landing", "settings": { "page-direction": "ltr" }, "sections": [], "previous": { "settings": { "page-direction": "ltr" }, "sections": [] }, "ignored": [] } ``` \[422] Unprocessable Entity ```json { "errors": { "sections.2.blocks.parameters.htmlText": ["may not contain scripts, event handlers or a javascript: or data: url"] } } ```