curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-F "kind=bar" \
-F "file=@barcode.png"
curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"kind": "bar",
"content_base64": "BASE64_ENCODED_IMAGE",
"filename": "barcode.png"
}'
{
"success": true,
"message": "No threats found.",
"result": {
"scan_id": "scn_c81f5a2e7d90",
"kind": "bar",
"status": "done",
"verdict": "clean",
"score": 0,
"sha256": "9b74c9897bac770ffc029102a200c5de2f1c3d8a6e9c5b1a7f0e4d3c2b1a0f9e",
"category": "benign",
"confidence": "low",
"data_residency": "global",
"image": {
"format": "png",
"width": 400,
"height": 160
},
"codes": [
{
"format": "code_128",
"payload_type": "text",
"raw": "ENCRATA-123456",
"verdict": "clean",
"score": 0,
"position": {"x": 12, "y": 40, "width": 376, "height": 1}
}
],
"signals": [],
"iocs": [],
"scanned_at": "2026-10-09T09:30:00Z"
}
}
Malware
Barcode Scan
Decode a barcode and inspect its content for security threats.
POST
/
api
/
lookup
/
malware
/
scan
curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-F "kind=bar" \
-F "file=@barcode.png"
curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"kind": "bar",
"content_base64": "BASE64_ENCODED_IMAGE",
"filename": "barcode.png"
}'
{
"success": true,
"message": "No threats found.",
"result": {
"scan_id": "scn_c81f5a2e7d90",
"kind": "bar",
"status": "done",
"verdict": "clean",
"score": 0,
"sha256": "9b74c9897bac770ffc029102a200c5de2f1c3d8a6e9c5b1a7f0e4d3c2b1a0f9e",
"category": "benign",
"confidence": "low",
"data_residency": "global",
"image": {
"format": "png",
"width": 400,
"height": 160
},
"codes": [
{
"format": "code_128",
"payload_type": "text",
"raw": "ENCRATA-123456",
"verdict": "clean",
"score": 0,
"position": {"x": 12, "y": 40, "width": 376, "height": 1}
}
],
"signals": [],
"iocs": [],
"scanned_at": "2026-10-09T09:30:00Z"
}
}
Barcode Scan decodes an uploaded image and checks the extracted value for suspicious content. It reads Code 128/39/93, Codabar, ITF, EAN-8/13, and UPC-A/E barcodes.
To send JSON instead, base64-encode the barcode image into
Authentication
Send your API key asAuthorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Request
The barcode image to scan, uploaded as
multipart/form-data. Send this field or
content_base64. When you omit filename, the uploaded file’s name is used.For a JSON body, send this field or
file. The base64-encoded barcode image. Send raw base64 only. A data URL prefix
such as data:image/png;base64, returns 400.Example request
Upload the barcode image from disk asmultipart/form-data. Replace barcode.png with the path to your barcode image.
curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-F "kind=bar" \
-F "file=@barcode.png"
content_base64:
curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"kind": "bar",
"content_base64": "BASE64_ENCODED_IMAGE",
"filename": "barcode.png"
}'
Example response
{
"success": true,
"message": "No threats found.",
"result": {
"scan_id": "scn_c81f5a2e7d90",
"kind": "bar",
"status": "done",
"verdict": "clean",
"score": 0,
"sha256": "9b74c9897bac770ffc029102a200c5de2f1c3d8a6e9c5b1a7f0e4d3c2b1a0f9e",
"category": "benign",
"confidence": "low",
"data_residency": "global",
"image": {
"format": "png",
"width": 400,
"height": 160
},
"codes": [
{
"format": "code_128",
"payload_type": "text",
"raw": "ENCRATA-123456",
"verdict": "clean",
"score": 0,
"position": {"x": 12, "y": 40, "width": 376, "height": 1}
}
],
"signals": [],
"iocs": [],
"scanned_at": "2026-10-09T09:30:00Z"
}
}
Barcode result fields
Abar result can contain these fields: scan_id, kind, status,
verdict, score, sha256, category, confidence, data_residency,
codes, image, signals, iocs, and scanned_at.
Every barcode decoded from the image. Missing when no barcode could be read.
Each item has the same shape as a QR Code Scan
codes item: format, payload_type, raw, final_url, verdict, score,
signals, and position. format is the lowercase barcode name, such as
code_128, ean_13, or upc_a.Evidence for the verdict. Each item is an object with
source, malicious, detail, and optional severity.When no barcode is found
If the image has no readable barcode, the scan still returns200 with
verdict: "unknown", no codes field, and a bar signal with the detail
“No barcode could be read in this image.”
See Malware Scan for the complete response schema and shared fields.
Errors
The API returns400 for invalid base64 content (including a data: URL prefix) or an unreadable image, 401 for a missing or invalid API key, 402 when your account has insufficient credits, 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.curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-F "kind=bar" \
-F "file=@barcode.png"
curl -X POST "https://developer.encrata.com/api/lookup/malware/scan" \
-H "Authorization: Bearer enc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"kind": "bar",
"content_base64": "BASE64_ENCODED_IMAGE",
"filename": "barcode.png"
}'
{
"success": true,
"message": "No threats found.",
"result": {
"scan_id": "scn_c81f5a2e7d90",
"kind": "bar",
"status": "done",
"verdict": "clean",
"score": 0,
"sha256": "9b74c9897bac770ffc029102a200c5de2f1c3d8a6e9c5b1a7f0e4d3c2b1a0f9e",
"category": "benign",
"confidence": "low",
"data_residency": "global",
"image": {
"format": "png",
"width": 400,
"height": 160
},
"codes": [
{
"format": "code_128",
"payload_type": "text",
"raw": "ENCRATA-123456",
"verdict": "clean",
"score": 0,
"position": {"x": 12, "y": 40, "width": 376, "height": 1}
}
],
"signals": [],
"iocs": [],
"scanned_at": "2026-10-09T09:30:00Z"
}
}
Was this page helpful?