hosting

POST /v1/sites/{siteId}/security/detections/{detectionId}/restore

Put a cleaned or quarantined file back.

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.restart 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}/security/detections/{detectionId}/restore \
  -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

The one-click undo for a false positive: puts the original file back where it was (from zinn-quarantine, or the scanner's kept original for a file cleaned in place), then re-scans. The file stays reported but automatic cleaning leaves it alone from then on. Durable workflow; 202 with the site's state, and the result lands in listSiteSecurityHistory as restored (or failed). Requires sites.restart. 422 when the finding is not restorable (can_restore: false).

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).
detectionId (path)stringYes—

Response

NameTypeRequiredWhat it is
statusMalwareStatusYesA site's scan verdict. There is deliberately no unscanned member: a site nothing has looked at yet is clean with last_scan_at: null, which is one nullable timestamp…
last_clean_atobjectNoWhen the platform last cleaned or quarantined malware on this site automatically or on Clean now. null = never needed to.
clean_failed_atobjectNoSince when a clean has been failing (a finding the platform could neither clean nor move aside, such as an infected wp-config.php). null = not failing. Only this lets the…
last_scan_atobjectYesWhen a scan last completed. null = never scanned. A scan that failed does not stamp this, so a stale success can never be mistaken for a fresh one.
detectionsMalwareDetection[]Yes—
recent_resolutionsResolvedMalwareDetection[]YesFindings that were present and are not any more, most recently cleared first — the record of the protection having worked, which an all-clear alone cannot show. resolved_at…
can_rescanbooleanYesWhether rescanSite will accept a request for this site: false while a scan is already running, false for a site that is not running at all (there is no document root to scan),…
last_scan_error_codestring<, scan_conflict, scanner_unreachable, scanner_missing, scan_failed>YesWhy a scan that ran could not finish; empty when none has failed. Non-empty means an attempt was made against this site and broke — an unreachable host, a vendor error, a scan…
unavailable_reasonstringYesWhy no scan was attempted; empty when one was. A stable machine identifier for the client to localise, never a sentence and never a vendor name. vendor_unsupported — the…
runtimeSiteRuntimeSecurityYesWhat our runtime sensor saw happen on this site, and whether anything was watching it at all. The malware fields above are a verdict on files at rest; this is the other half —…

Errors this endpoint can return

401 · 403 · 404 · 422 · 429 · 503