Switch Patch & Protect

View as MarkdownOpen in Claude
Switch Patch & Protect on or off over an explicit selection of websites: `sites` (exact ids, 1 to 200) and `status` (`enabled` or `disabled`). **Every protected website is billed.** The add-on is metered per website and per month, with no websites included in the plan, so enabling it here adds to the organization's invoice. Without the add-on subscribed the call answers 403 and the user enables it from the Modular DS dashboard: an integration never buys it. Switching on installs the security plugin on WordPress; switching off removes it and leaves the website unprotected. Both are pipelines, so the answer is **202** with one `site-actions` document per website, which you follow through `/site-actions`, and `meta.skipped` for the rest. A website is skipped when it is not connected (`SITE_UNREACHABLE`), when it is being restored or already has a switch running (`CONFLICT`), or when it is already in the state you asked for (`ALREADY_APPLIED`). Ids outside your reach come back as `PERMISSION_DENIED` instead of being dropped in silence.

Authentication

AuthorizationBearer

Personal access token created in the Modular DS dashboard; read-only tokens can only call GET endpoints.

Request

This endpoint expects an object.
siteslist of doublesOptional
statusstringOptional

Response

202 - One website switched on, one skipped

datalist of objectsOptional
jsonapiobjectOptional
metaobjectOptional