Skip to main content
POST
/
guardrails
/
policy
/
scan-pdf
Scan a PDF for security threats using a specific policy.
curl --request POST \
  --url https://api.enkryptai.com/guardrails/policy/scan-pdf \
  --header 'Content-Type: application/json' \
  --header 'X-Enkrypt-Policy: <x-enkrypt-policy>' \
  --header 'apikey: <api-key>' \
  --data '
{
  "file": "<string>"
}
'
{
  "summary": {
    "policy_violation": 0,
    "injection_attack": 0
  },
  "details": {
    "total_pages": 1,
    "pages_with_detections": 0,
    "detections": []
  }
}

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.

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.