Skip to content

GET /v1/scan/{id}

Retrieve the status and results of a previously submitted scan. Use this to poll for results after submitting a scan via POST /v1/scan (sync) or POST /v1/scan/async (async). Scan types are determined automatically based on file size.

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, toxic, mixed, or failed.
virusobjectWhen completeMalware detection results.
virus.cleanbooleanWhen completetrue if no virus detected.
virus.signaturestring | nullWhen completeName of the detected threat, or null if clean.
nsfwobjectWhen completeContent analysis (images) 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.
textobjectWhen completeContent analysis (text) results. Present when text analysis was applied.
text.cleanbooleanWhen completetrue if no text issues detected.
text.toxicobjectWhen completeToxicity detection with labels and maxScore.
text.piiobjectWhen completePII detection with entities list and count.
text.sentimentobjectWhen completeSentiment analysis with dominant label and scores.
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.
scanningThe file is actively being processed.
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.
infectedVirus or malware detected. Check virus.signature for the threat name.
nsfwNSFW content detected. Check nsfw.categories for details.
toxicToxic or harmful text content detected. Check text.toxic for details.
mixedMultiple types of issues detected.
failedScan could not be completed. 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": {
"clean": true,
"signature": null
},
"nsfw": {
"clean": true,
"categories": [],
"confidence": 0.01
},
"text": {
"clean": true,
"toxic": { "labels": [], "maxScore": 0.0 },
"pii": { "entities": [], "count": 0 },
"sentiment": { "dominant": "NEUTRAL", "scores": {} }
},
"file_hash": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"completed_at": "2026-03-23T12:00:00Z"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "complete",
"verdict": "infected",
"virus": {
"clean": false,
"signature": "Win.Trojan.Agent-123456"
},
"nsfw": {
"clean": true,
"categories": [],
"confidence": 0.02
},
"text": {
"clean": true,
"toxic": { "labels": [], "maxScore": 0.0 },
"pii": { "entities": [], "count": 0 },
"sentiment": { "dominant": "NEUTRAL", "scores": {} }
},
"file_hash": "sha256:a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
"completed_at": "2026-03-23T12:01:30Z"
}
{
"scan_id": "scn_01HX7Z9K3M2N4P5Q6R7S8T9U0V",
"status": "complete",
"verdict": "nsfw",
"virus": {
"clean": true,
"signature": null
},
"nsfw": {
"clean": false,
"categories": ["explicit_nudity", "graphic_violence"],
"confidence": 0.97
},
"text": {
"clean": true,
"toxic": { "labels": [], "maxScore": 0.0 },
"pii": { "entities": [], "count": 0 },
"sentiment": { "dominant": "NEUTRAL", "scores": {} }
},
"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.