---
title: "Validate an authz policy without saving"
method: POST
path: "/authz/policies/validate"
tags: ["authz-policies"]
---

# Validate an authz policy without saving

`POST /authz/policies/validate`

(reserved for future use) Runs the same validation as create (compile + smoke test in a sandbox) but does not persist or activate the policy.

Required roles: All

## Request body

- ValidateAuthzPolicyRequest
  - `name` string, required
  - `rego` string, required

## Response `200`

Validation passed (with optional warnings)

- ValidateAuthzPolicyResponse
  - `valid` boolean, required
  - `warnings` string[], required

## Other responses

- `400` — Bad Request - the policy failed validation
- `401` — Unauthorized - Authentication failed
- `403` — Forbidden - requires an API key with All permission
- `503` — Service Unavailable - authz/OPA is not configured in this environment

---

[API](https://skmtc.net/qlonolink/apis/qaip-apis.md) · [All operations](https://skmtc.net/qlonolink/apis/qaip-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qlonolink/qaip-apis/revisions/f5f5994dfe05/schema)
