Skip to navigation

Install a component on websites

View as MarkdownOpen in Claude

Installs a plugin or theme from the wordpress.org repository on the websites you list in sites, and can activate it right away. Find the slug with “Search components”.

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. A website is skipped when it is not connected, is a multisite sub-site, already has the item (unless overwrite is true), is already installing it, or already has too many pending or running actions.

Body

  • type (plugin or theme, required): the kind of component to install.
  • from (string, required): the source; only repository (wordpress.org) is accepted.
  • value (string, required): the wordpress.org slug, as it appears in the item’s URL, for example woocommerce; at most 200 characters.
  • sites (array of integers, required): ids of the websites to act on, 1 to 50.
  • activate (boolean, optional): activate the item after installing it. Default false.
  • overwrite (boolean, optional): reinstall over an existing copy instead of skipping the website. Default false.
  • clean_cache (boolean, optional): clear each website’s cache after installing. Default false.

Errors

  • 422: sites is invalid, from is not repository, or value is not a slug wordpress.org knows for that type.

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.
activatedoubleOptional
fromstringOptional
siteslist of doublesOptional
typestringOptional
valuestringOptional

Response

202 Accepted - one install launched, one website skipped

datalist of objectsOptional
jsonapiobjectOptional
metaobjectOptional