Configure the template's public launch link
Manages the Template’s public “launch this demo” link at <origin>/launch/<launchToken>.
One endpoint, four actions selected by action:
enable— turn the link on. Mints alaunchTokenif the Template doesn’t already have one. Only valid on a"ready"Template (409 template_not_readyotherwise). Requires a paid plan (402 template_sharing_requires_paid_plan).rotate— mint a newlaunchToken, invalidating the old URL, and ensure the link is enabled. Same409/402gates asenable.disable— turn the link off. Free, so a downgraded owner can always turn an existing link off.update— change launcher settings (quotaMode,entryMode,expirationMode,expirationMinutes,landingPath,branding,protected) without touching whether the link is enabled. Free, no plan gate.
Templates expose launchExpirationMode and launchExpirationMinutes on every response; a
null minute value means fixed demos default to 24 hours (1440) and inactivity demos
default to 1 hour (60). Both are capped by the server’s configured maximum demo lifetime.
Authorizations
Personal API token, sent as Authorization: Bearer <SANDYWP_API_KEY>. Obtain one from the dashboard account menu (API keys), sandywp auth login, or POST /api/account/tokens. A missing or invalid token returns 401 auth_required. Scoped OAuth tokens are limited to the Imports family and GET /api/account/me; see the top-level conventions.
Headers
Selects which of the caller's workspaces to act in, for accounts belonging to more than one (legacy alias: X-SandyWP-Organization). Defaults to the caller's own personal workspace when omitted. Every id in this API (sandboxes, Templates, repositories) is scoped to a single workspace, so this header changes which set of resources is visible.
Path Parameters
The template id.
Body
Required. What to do with the launcher.
enable, disable, rotate, update update only. Who a launched demo counts against: visitor (default; the visitor's own quota) or owner (the Template owner's plan slots).
visitor, owner update only. anonymous (default; straight to an auto-login demo) or email (capture an email first, recorded as a lead — see GET /api/app/templates/{id}/leads).
anonymous, email update only. fixed expires each demo after a fixed lifetime; inactivity renews the deadline while the visitor actively uses WordPress (a background tab, including WordPress heartbeat polling, does not renew it).
fixed, inactivity update only. Allowed values depend on expirationMode and are NOT a flat enum: fixed lifetimes accept 60, 420, 1440, 4320, or 10080 minutes; inactivity lifetimes accept 10, 30, 60, or 1440 minutes. Values above the server's configured maximum demo lifetime are rejected regardless of mode. Omitting this while switching expirationMode applies that mode's default (1440 for fixed, 60 for inactivity).
10, 30, 60, 420, 1440, 4320, 10080 update only. Sandbox-local path opened after auto-login, e.g. /, /shop/, or /wp-admin/ (default). Must start with /, must not start with //, and may carry a query string / fragment for deep links into wp-admin.
"/wp-admin/"
update only. Custom copy/colors for the public landing page, or null to clear it. Unknown/invalid sub-fields are silently dropped rather than rejected.
update only. Protected demo, true by default. When true, every demo launched from this link (after the change) gets DISALLOW_FILE_MODS and DISALLOW_FILE_EDIT written into its wp-config.php, so visitors get wp-admin without the plugin/theme installer, the ZIP uploader, or the file editor.
Response
The updated Template.
A reusable snapshot of a finished sandbox.

