hosting

POST /v1/sites/{siteId}/cleaner/clean

Clean a site.

All hosting endpoints

All developer docs →

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 POST https://api.zinndigital.com/v1/sites/{siteId}/cleaner/clean \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

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

Starts a clean (a job). The database is dumped and every file that will go is archived FIRST; if the home page answers worse afterwards, both are put back and the job ends restored. select names the item ids to clean (from the latest scan); omitted means every item ticked by default. A site with nothing to clean ends nothing. Needs the Site Cleaner add-on on the account and an account in good standing (422 otherwise). Requires sites.view and hosting.backup.manage.

Parameters

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

Request body

NameTypeRequiredWhat it is
selectstring[]NoItem ids to clean; omit for every default-ticked item.

Response

NameTypeRequiredWhat it is
idstringYes—
kindstring<scan, clean, undo>Yes—
triggerstring<manual, schedule, staff>Yes—
statestring<queued, running, done, nothing, restored, failed>Yes—
cmsstringNoThe application detected: wordpress, joomla, drupal, prestashop, opencart, grav, mediawiki or other.
messagestringYes—
totalsobjectNocount, mb, files, rows of the selected (clean) or default-ticked (scan) items.
selectedstring[]No—
saved_mbnumberNo—
saved_filesintegerNo—
saved_db_mbnumberNo—
removed_countintegerNo—
has_backupbooleanYesWhether a backup was taken before the clean.
backup_expires_atstringNo—
undo_ofstringNo—
created_atstringYes—
started_atstringNo—
finished_atstringNo—
itemsSiteCleanerItem[]No—

Errors this endpoint can return

401 · 403 · 404 · 422 · 429