---
title: "Check saved ads against the enabled rules and record cases"
method: POST
path: "/projects/{project_id}/policy-rule-evaluation"
tags: ["Policy"]
---

# Check saved ads against the enabled rules and record cases

`POST /projects/{project_id}/policy-rule-evaluation`

## Request

- Base URL: `https://adslighthouse.com/api/v1`
- URL: `https://adslighthouse.com/api/v1/projects/{project_id}/policy-rule-evaluation`
- Auth: HTTP bearer

Evaluates every enabled policy rule of the project against the saved checks in a date range (last 30 days by default, at most 92 days), like "Evaluate saved ads" in the app. New matches are recorded as findings and open or update cases; a resolved case reopens only for an ad observed after it was resolved. Review matches with list_policy_cases and list_policy_case_evidence before deciding what they mean. Repeating the call records nothing twice. New captures are evaluated automatically; use this after adding or changing a rule to review older checks. A match is a lead to review: an observation shows an ad was displayed for a search at a moment, not proof of a violation, spend or a purchased keyword. Requires the write scope.

## Path parameters

- `project_id` string, required: The project: its id, its brand domain (for example nike.example) or its exact project or brand name. Unknown or ambiguous references return not_found; call list_projects then.

## Request body

- object
  - `range` '7d' | '14d' | '30d' | '12m' | 'custom': Window ending today: 7d, 14d, 30d (default) or 12m. Use custom with from and to for fixed dates.
  - `from` string: First local day, YYYY-MM-DD (custom range).
  - `to` string: Last local day, YYYY-MM-DD, included in full (custom range).
  - `time_zone` string: IANA time zone for day boundaries, such as America/New_York. Defaults to the time zone of the person the credential acts for.

## Response `200`

Check saved ads against the enabled rules and record cases

- object
  - `window` object, required
    - `from` string, required: First local day included, YYYY-MM-DD.
    - `to` string, required: Last local day included, YYYY-MM-DD.
    - `time_zone` string, required
    - `start` string, required: Inclusive start instant, ISO 8601.
    - `end` string, required: Exclusive end instant, ISO 8601.
  - `findings` integer, required: New findings recorded by this call.
  - `opened` integer, required: Cases opened by this call.
  - `reopened` integer, required: Resolved cases reopened by a newer match.
  - `truncated` boolean, required: True when a rule read only the first 20,000 saved ads of the range.
  - `request_id` string

## Other responses

- `400`: Invalid parameters, cursor or body.
- `401`: Missing, invalid, expired or revoked credential.
- `403`: The credential lacks the write scope, the plan does not include the API, or the allowance is used up.
- `404`: Unknown project, keyword or run in this account.
- `409`: The idempotency key was already used for a different request.
- `429`: Rate limit reached. Retry after the Retry-After seconds.
- `503`: The requested service or file is temporarily unavailable.

---

[API](https://skmtc.dev/adslighthouse/apis/ads-lighthouse-api.md) · [All operations](https://skmtc.dev/adslighthouse/apis/ads-lighthouse-api/llms.txt) · [OpenAPI document](https://skmtc.dev/adslighthouse/apis/ads-lighthouse-api/revisions/e1a4a40b11a9?raw)
