Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Send an organization API key in the Authorization header as Bearer <api_key>.

Path Parameters

policy_identifier
string<uuid>
required

The policy identifier to enforce.

Example:

"a90e34d6-41af-432f-a6ae-046598df4539"

Body

application/json

Policy enforcer request schema.

direction
enum<string>
required

Whether to evaluate input or output messages against the policy.

Available options:
input,
output
Example:

"input"

messages
object[]
required

Ordered list of messages that compose the conversation to evaluate.

Minimum array length: 1
includeEvaluations
boolean
default:false

Whether to include evaluation details in the response.

Example:

false

metadata
object

Optional contextual metadata forwarded to guardrails.

Response

Successful Response

Policy enforcement response schema.

enforcerIdentifier
string<uuid>
required

Identifier of the policy enforcer that processed the request.

Example:

"8e9671f0-2365-4df9-bca0-2cc3cc61b0c9"

action
enum<string>
required

Overall action decided by the policy (allow, detect, redact, block).

Available options:
block,
redact,
detect,
allow
Example:

"block"

evaluations
object[]

Per-guardrail evaluation results.

Evaluation payload for prompt injection guardrail.

Last modified on March 14, 2026