hosting
POST /v1/sites/{siteId}/security/detections/{detectionId}/restore
Put a cleaned or quarantined file back.
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
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
detectionId (path) | string | Yes | — |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
status | MalwareStatus | Yes | A 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_at | object | No | When the platform last cleaned or quarantined malware on this site automatically or on Clean now. null = never needed to. |
clean_failed_at | object | No | Since 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_at | object | Yes | When 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. |
detections | MalwareDetection[] | Yes | — |
recent_resolutions | ResolvedMalwareDetection[] | Yes | Findings 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_rescan | boolean | Yes | Whether 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_code | string<, scan_conflict, scanner_unreachable, scanner_missing, scan_failed> | Yes | Why 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_reason | string | Yes | Why 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… |
runtime | SiteRuntimeSecurity | Yes | What 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