Skip to navigation

Activate or deactivate a component on websites

View as MarkdownOpen in Claude

Activates or deactivates one plugin or theme on the websites you list in sites. The action is explicit, never a flip.

It creates one site action per website that passes the checks. The work finishes later: see Writes and asynchronous operations. Follow the site actions with “List site actions”. Websites that cannot be processed are reported in meta.skipped, each with a reason_code and a message, and do not fail the call. Activating a theme replaces the active theme of each website, and the answer says so in a warning. A website is skipped when it is not connected, does not have the component, hides its update notice, already has it in the requested state, or already has too many pending or running actions. WordPress itself cannot be activated or deactivated, a theme cannot be deactivated (activate another theme instead), and the Modular Connector plugin is never deactivated.

Body

  • sites (array of integers, required): ids of the websites to act on, 1 to 50.
  • action (activate or deactivate, required): what to do with the component.

Errors

  • 404: the component is not installed on any of your websites.
  • 422: sites is invalid or action is not activate or deactivate.

Authentication

AuthorizationBearer

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

Path parameters

componentstringRequired

Request

This endpoint expects an object.
actionstringOptional
siteslist of doublesOptional

Response

202 Accepted - one deactivation launched, one website skipped

datalist of objectsOptional
jsonapiobjectOptional
metaobjectOptional