Skip to main content
POST
Dry-run firewall rules against sample text
Runs a candidate heuristics array against a sample text and returns what matched. Nothing is stored and no policy is created. Two properties make the result trustworthy:
  • It compiles through the same validator the writer uses. A rule the tester refuses is a rule POST /v1/ai-gateway/firewall-policies would also refuse, so the tester can never green-light a pattern that could not run.
  • It reports skipped rules explicitly. A rule that fails to compile is named rather than silently ignored. On a live block policy a skipped rule is a fail-closed condition — the gateway refuses the request with 503 firewall_policy_degraded rather than serve it under a policy it knows is only partly applied.
Requires the read capability on ai_gateway. See the control-plane overview for authentication, the {data, meta} envelope, pagination and error types.

Authorizations

Authorization
string
header
required

OAuth 2.1 authentication — recommended for new integrations. Access tokens (kc_ prefix) are minted at the root-host token endpoint https://api.knoxcall.com/oauth/token and passed as Authorization: Bearer <access_token>. Public clients must use PKCE with the authorization_code grant; confidential clients may use client_credentials. The first-party SDKs and the knoxcall login CLI handle token minting, caching, refresh, and DPoP for you.

Body

application/json
text
string
required

The prompt text to scan.

heuristics
object[]

Candidate rules to test alongside the built-ins.

Response

The scan result.

data
object
meta
object

Metadata included with every API response.