hosting

PUT /v1/sites/{siteId}/wordpress/update-policy/components

Switch one plugin's or theme's auto-update, as an exception to the site switch.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X PUT https://api.zinndigital.com/v1/sites/{siteId}/wordpress/update-policy/components \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "kind": <string<plugin, theme>>, "name": <string>, "auto_update": <string<on, off, default>> }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

P3-065. on or off stores an exception for this one plugin or theme; default removes it, so it follows the site-wide plugins/themes switch again. The whole policy is then applied to the site and the site re-read, like setSiteWordPressUpdatePolicy: the response is a fresh read, never an echo. ⛔ A later change of the site-wide policy keeps every exception. At most 500 exceptions per kind per site. ⛔ Fleet only — refused where wp_update_policy is false. Requires sites.view and sites.panel_access.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Request body

NameTypeRequiredWhat it is
kindstring<plugin, theme>Yes—
namestringYesThe plugin or theme folder name, as WordPress lists it.
auto_updatestring<on, off, default>Yeson/off set an exception; default removes it.

Response

NameTypeRequiredWhat it is
corestring<off, minor, all>YesThe stored policy for WordPress core updates.
pluginsbooleanYesThe stored policy — whether every plugin should auto-update.
themesbooleanYesThe stored policy — whether every theme should auto-update.
ringstring<canary, early, general>YesThe staged-rollout ring this site belongs to.
applied_atstringYesWhen the policy last reached the site, ISO-8601, or "" if it never has. ⛔ A timestamp and not a flag: "when did this last reach the site" is the question an operator asks, and a…
apply_errorstringYesWhy the last apply failed, or "". Kept beside applied_at rather than replacing it, so a failed re-apply does not erase that an earlier one worked.
observed_readbooleanYesWhether the site itself was read. ⛔ An empty drift is only meaningful while this is true.
observed_corestringYesWhat WP_AUTO_UPDATE_CORE is set to on the site — off, minor, all, or "" meaning the constant is not defined at all, so WordPress applies its own default. ⛔ "" is…
plugins_offstring[]YesThe plugins on this site that are NOT auto-updating.
themes_offstring[]YesThe themes on this site that are NOT auto-updating.
driftstring<core, plugins, themes>[]YesWhich of core, plugins, themes the site disagrees with the policy about.
plugins_onstring[]YesThe plugins on this site that ARE auto-updating; with plugins_off, every plugin that can.
themes_onstring[]YesThe themes on this site that ARE auto-updating.
plugin_overridesobjectYesPer-plugin exceptions to the plugins switch, {folder name: true|false}. A plugin not named here follows the switch. ⛔ A re-apply of the site-wide policy keeps them.
theme_overridesobjectYesPer-theme exceptions to the themes switch, {folder name: true|false}.
plugins_driftedstring[]YesThe plugins whose observed auto-update is not what they should be (their exception when they have one, else the plugins switch), in both directions.
themes_driftedstring[]YesThe themes whose observed auto-update is not what they should be.

Errors this endpoint can return

400 · 401 · 403 · 404 · 422 · 429 · 503