---
title: "Test input against all active policies (legacy)"
method: POST
path: "/api/v1/policies/test"
tags: ["Testing"]
deprecated: true
---

# Test input against all active policies (legacy)

`POST /api/v1/policies/test`

## Request

- Base URL: `https://agent.getaxonflow.com`
- URL: `https://agent.getaxonflow.com/api/v1/policies/test`
- Auth: none declared
- TypeScript: <https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api/docs/api/v1/policies/test/post.ts> (a function with typed inputs; its response is checked against the schema)

> **Deprecated.**

**Legacy endpoint.** Evaluates the supplied input against all active
dynamic policies and returns the raw policy evaluation result. Prefer
`POST /api/v1/policies/simulate` (dry-run semantics, tier-aware) or
`POST /api/v1/dynamic-policies/{id}/test` (single-policy testing).

## Request body

- object
  - `query` string: Sample query to test against
  - `user` SimulationUserContext: User context for policy simulation and testing
    - `id` integer: Numeric user identifier
    - `email` string
    - `role` string
    - `region` string: User's region for geo-based routing policies
    - `permissions` string[]
    - `tenant_id` string
    - `org_id` string: Organization for multi-tenant isolation
  - `request_type` string: Type of request being simulated

## Response `200`

Policy evaluation result

- object
  - `allowed` boolean
  - `applied_policies` string[]
  - `risk_score` number, float
  - `severity` string: Highest severity of matched policies: critical, high, medium, low
  - `required_actions` string[]
  - `processing_time_ms` integer

## Other responses

- `400`: Invalid request body

---

[API](https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api.md) - [All operations](https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getaxonflow/apis/axonflow-policy-management-api/revisions/302fbde24320?raw)
