Skip to content

GET /v1/scan/{id}

Retrieve the status and results of a previously submitted scan.

GET https://api.filesafety.dev/v1/scan/{id}

Requires x-api-key header. See Authentication.

ParameterTypeDescription
idstringThe scan ID returned by POST /v1/scan (e.g., scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V).
Terminal window
curl https://api.filesafety.dev/v1/scan/scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V \
-H "x-api-key: fs_live_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345"
FieldTypePresentDescription
scan_idstringAlwaysUnique scan identifier.
statusstringAlwaysCurrent scan status. See lifecycle below.
verdictstringWhen completeOverall result: clean, infected, nsfw, mixed, or failed.
virusobjectWhen completeVirus scan results.
virus.enginestringWhen completeScan engine used. Currently always "clamav".
virus.cleanbooleanWhen completetrue if no virus detected.
virus.signaturestring | nullWhen completeName of the detected threat, or null if clean.
nsfwobjectWhen completeNSFW scan results.
nsfw.cleanbooleanWhen completetrue if no NSFW content detected.
nsfw.categoriesstring[]When completeList of detected NSFW categories (empty if clean).
nsfw.confidencenumberWhen completeConfidence score between 0 and 1.
file_hashstringWhen completeCryptographic hash of the file, prefixed with sha256:.
completed_atstringWhen completeISO 8601 timestamp of when scanning finished.

A scan moves through the following statuses:

awaiting_upload → pending → scanning → complete
↘ failed
StatusDescription
awaiting_uploadPresigned URL was issued but the file has not been uploaded yet.
pendingFile received and queued for scanning.
scanningScan engines are actively processing the file.
completeScanning finished. Verdict and results are available.
failedScanning could not complete due to an internal error.

The verdict field is present only when status is complete:

VerdictMeaning
cleanNo threats detected by any scan engine.
infectedVirus or malware detected. Check virus.signature for the threat name.
nsfwNSFW content detected. Check nsfw.categories for details.
mixedBoth virus and NSFW issues detected.
failedAt least one scan engine failed. Retry the scan.
{
"scan_id": "scn_01HX8A1B2C3D4E5F6G7H8I9J0K",
"status": "awaiting_upload"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "pending"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "scanning"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "complete",
"verdict": "clean",
"virus": {
"engine": "clamav",
"clean": true,
"signature": null
},
"nsfw": {
"clean": true,
"categories": [],
"confidence": 0.01
},
"file_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"completed_at": "2026-03-23T12:00:00Z"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "complete",
"verdict": "infected",
"virus": {
"engine": "clamav",
"clean": false,
"signature": "Win.Trojan.Agent-123456"
},
"nsfw": {
"clean": true,
"categories": [],
"confidence": 0.02
},
"file_hash": "sha256:a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"completed_at": "2026-03-23T12:01:30Z"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "complete",
"verdict": "nsfw",
"virus": {
"engine": "clamav",
"clean": true,
"signature": null
},
"nsfw": {
"clean": false,
"categories": ["explicit_nudity", "graphic_violence"],
"confidence": 0.97
},
"file_hash": "sha256:f1e2d3c4b5a6f1e2d3c4b5a6f1e2d3c4b5a6f1e2d3c4b5a6f1e2d3c4b5a6f1e2",
"completed_at": "2026-03-23T12:02:45Z"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "complete",
"verdict": "failed"
}
StatusErrorCause
401"Invalid or missing API key"Missing or invalid x-api-key header.
404"Scan not found"No scan exists with the given ID.
  • Poll every 2-3 seconds after submitting a scan.
  • Most scans complete within 15 seconds.
  • Stop polling when status is complete or failed.
  • For production use, prefer webhooks over polling to reduce unnecessary requests.