Skip to main content
POST
File Scan
File Scan analyzes a file for malware and returns a verdict, file hash, and supporting indicators.

Authentication

Send your API key as Authorization: Bearer <key>.

Request

string
required
Set this value to file.
string
The base64-encoded file. Do not include a data URL prefix. Provide this field or source_url.
string
A URL from which Encrata can download the file. Provide this field or content_base64.
string
The original file name.
boolean
Set to true to include STIX 2.1 output when available. Defaults to false.
The maximum file size is 100 MiB.

Example request

Example response

File result fields

string
The SHA-256 hash of the scanned file.
string
The detected threat category when available.
string[]
Security signals that contributed to the verdict.
See Malware Scan for the complete response schema and shared fields.

Errors

The API returns 400 for invalid input, 401 for a missing or invalid API key, 402 when your account has insufficient credits, 413 when the file exceeds 100 MiB, and 429 when you exceed a rate limit.

Credits

A successful scan costs 1 credit. Repeating the same scan kind and content is deduplicated for billing.