---
title: "Run a policy's tests (or cases[]) through the preflight engine against today's resolve answers: each case's decision, reason codes and pass or fail. For CI: node crawlcheck-policy.mjs test crawlcheck-policy.json exits 1 on a failure."
method: POST
path: "/api/v1/policy/test"
---

# Run a policy's tests (or cases\[\]) through the preflight engine against today's resolve answers: each case's decision, reason codes and pass or fail. For CI: node crawlcheck-policy.mjs test crawlcheck-policy.json exits 1 on a failure.

`POST /api/v1/policy/test`

## Request

- Base URL: `https://crawlcheck.io`
- URL: `https://crawlcheck.io/api/v1/policy/test`
- Auth: none required

## Request body

- object
  - `policy` object
  - `policy_id` string
  - `cases` unknown[]
    - unknown

## Response `200`

results

- object, nullable
  - `ok` boolean, nullable
  - `kind` string, nullable
  - `total` number, nullable
  - `passed` number, nullable
  - `skipped` number, nullable
  - `results` object[], nullable
    - `domain` string, nullable
    - `action` string, nullable
    - `expect` string[], nullable
    - `decision` string, nullable
    - `reason_codes` string[], nullable
    - `status` string, nullable
    - `pass` boolean, nullable

---

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