> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parmanasystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# parmana.api.policy_api

Parmana Policy API.

Validate Runtime policies.

## PolicyApi Objects

```python theme={null}
class PolicyApi()
```

Policy API.

## Responsibilities

* Confirm a policy (name + version) is loadable by the Runtime

This API does NOT:

* validate an arbitrary policy document's contents. POST
  /policies/validate (packages/api/src/routes/policies.ts) only
  checks that `policyRepository.load(policyId, policyVersion)`
  succeeds -- it does not accept or check a policy document body.
* execute Business Transactions
* verify trust records
* replay executions
* generate receipts

#### validate

```python theme={null}
def validate(policy_id: str, policy_version: str) -> dict[str, Any]
```

Confirm that a policy (name + version) is loadable.

## Parameters

policy\_id:
Policy identifier (`policyId`).

policy\_version:
Policy version (`policyVersion`).

## Returns

`\{"valid": bool, "errors": list[str]\}`.

POST /policies/validate does not use the shared \{error, code?}
envelope for 400 or 404: both are \{valid, errors}, the caller's
answer, not an SDK-level failure -- so those two statuses are
exempted from the default raise-on-error behavior. 401 is not
exempted: it is generated by caller-auth middleware before this
route's own handler ever runs, and does use the shared envelope,
identically to every other route.
