---
title: "Check action against policies"
method: POST
path: "/api/guardrail/check"
tags: ["GuardRail"]
---

# Check action against policies

`POST /api/guardrail/check`

## Request

- Base URL: `https://plith.ai`
- URL: `https://plith.ai/api/guardrail/check`
- Auth: none required

Evaluates a proposed agent action against active org governance policies. Deterministic rule evaluation — no LLM. Uses GIN index on action_types. Costs 1 credit. Fails open (allow) if the policy service is unavailable.

## Request body

- object
  - `agent_id` string, required: Identifier for the agent making the request.
  - `proposed_action` object, required: The action being proposed. Must include 'type'; all other fields are passed through to rule evaluation.
    - `type` string, required: Action type. Used for GIN index filtering.

## Response `200`

Governance decision (allow or deny). Also returned on graceful degradation with fallback: true.

- object
  - `decision` 'allow' | 'deny'
  - `reason` string
  - `policy_id` string, uuid, nullable
  - `override` object, nullable: Present when decision is 'deny'. Indicates whether a human override is available.
    - `available` boolean
  - `audit_id` string, uuid, nullable
  - `fallback` boolean: true when the decision was made due to policy service unavailability (fail-open).
  - `cross_product` string
  - `request_id` string
  - `credits_used` integer
  - `credits_remaining` integer
  - `fallback_behavior` string

## Other responses

- `400`: Missing agent_id or proposed_action.type
- `401`: Invalid or missing API key
- `402`: Insufficient credits
- `413`: Payload too large

---

[API](https://skmtc.dev/plith/apis/plith-api.md) · [All operations](https://skmtc.dev/plith/apis/plith-api/llms.txt) · [OpenAPI document](https://skmtc.dev/plith/apis/plith-api/revisions/4a03164b0d75?raw)
