hosting

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

Scan a site for things to clean (free).

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/scan \
  -H "Authorization: Bearer zdk_live_…"

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 read-only scan of the site (a job). Free for every account: it lists unused plugins and themes, leftovers of removed plugins, database junk, plugin log tables and junk files with their sizes. Poll getSiteCleaner for the result. One job runs per site at a time (422 while another runs). Requires sites.view and hosting.backup.manage.

Parameters

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

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