# `theme.switch` Switch the workspace draft to another installed theme (keep-layout or theme-skeleton) — lossless: settings kept by id, sections parked never deleted; returns the Geçiş raporu. - **scope**: `design:write` - **storefront-visible** (bumps the catalog generation): no - **destructive**: no ## Payload | field | type | required | notes | |---|---|---|---| | `workspace` | string (/^(main\|ws_[A-Z0-9]{26})$/, default "main") | no | | | `themeId` | string (/^[a-z][a-z0-9-]*\.[a-z][a-z0-9-]*$/, ≤80 chars) | yes | | | `version` | string (/^\d+\.\d+\.\d+$/) | no | | | `mode` | "keep-layout" \| "theme-skeleton" | no | | | `pages` | array (≤40) | no | | | `preset` | object | no | | | ` colorway` | string (≤40 chars) | no | | | ` typeset` | string (≤40 chars) | no | | | `keepBrand` | boolean | no | | | `expectedRev` | integer (1..9007199254740991) \| null | no | | ### JSON Schema ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "workspace": { "default": "main", "type": "string", "pattern": "^(main|ws_[A-Z0-9]{26})$" }, "themeId": { "type": "string", "maxLength": 80, "pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*$" }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" }, "mode": { "default": "keep-layout", "type": "string", "enum": [ "keep-layout", "theme-skeleton" ] }, "pages": { "maxItems": 40, "type": "array", "items": { "type": "string", "maxLength": 80 } }, "preset": { "type": "object", "properties": { "colorway": { "type": "string", "maxLength": 40 }, "typeset": { "type": "string", "maxLength": 40 } }, "additionalProperties": false }, "keepBrand": { "type": "boolean" }, "expectedRev": { "default": null, "anyOf": [ { "type": "integer", "minimum": 1, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "themeId" ], "additionalProperties": false } ```