Skip to main content
POST
Configure the template's public launch link

Authorizations

Authorization
string
header
required

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

X-SandyWP-Workspace
string

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

id
string
required

The template id.

Body

application/json
action
enum<string>
required

Required. What to do with the launcher.

Available options:
enable,
disable,
rotate,
update
quotaMode
enum<string>

update only. Who a launched demo counts against: visitor (default; the visitor's own quota) or owner (the Template owner's plan slots).

Available options:
visitor,
owner
entryMode
enum<string>

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).

Available options:
anonymous,
email
expirationMode
enum<string>

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).

Available options:
fixed,
inactivity
expirationMinutes
enum<integer>

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).

Available options:
10,
30,
60,
420,
1440,
4320,
10080
landingPath
string

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.

Example:

"/wp-admin/"

branding
object | null

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.

protected
boolean

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.

template
object
required

A reusable snapshot of a finished sandbox.