Skip to main content
POST
Scan a PDF for security threats using a specific policy.
Archived: This endpoint is legacy. Use the new Guardrail Scan PDF endpoint instead, which supports separate input/output detectors via X-Enkrypt-Mode.

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-Policy
string
required

Name of the policy to apply

Body

application/json
file
string
required

Base64-encoded PDF file content.

user_metadata
object

Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.

Example:

Response

200 - application/json

Scan results for the provided PDF using the specified policy.

summary
object
required

Summary counts of detections by detector type.

details
object
required

Detailed scan results including page-level information.

user_metadata
object

Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.

Example: