---
title: "A project's policy rules"
method: GET
path: "/projects/{project_id}/policy-rules"
tags: ["Policy"]
---

# A project's policy rules

`GET /projects/{project_id}/policy-rules`

## Request

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

Lists the project's policy rules, oldest first: type, parameters, observation scope, whether each is enabled and how many open cases it has. Types and params: forbidden_terms {terms, fields: headline|description|display_url, applies_to, authorized_domains}; brand_term {extra_terms, authorized_domains}; direct_linking {authorized_domains}; promo_code {codes, any_explicit_code, allowed_codes, applies_to, authorized_domains}; position_limit {top_positions 1-10, applies_to, authorized_domains}; affiliate_id {authorized_ids}. applies_to is unauthorized (default for position limits) or all_non_owned (default for terms and codes). Your own domains never match, except for affiliate_id; advertisers classified as authorized retailers and authorized_domains count as authorized.

## 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.

## Response `200`

A project's policy rules

- object
  - `data` object[], required
    - `id` string, required
    - `project_id` string, required
    - `name` string, required
    - `type` 'forbidden_terms' | 'brand_term' | 'direct_linking' | 'promo_code' | 'position_limit' | 'affiliate_id', required
    - `enabled` boolean, required
    - `readable` boolean, required: False when the stored configuration no longer parses; such a rule is skipped.
    - `params` object, nullable, required: Parameters for the rule type; send only the ones that type uses.
      - `terms` string[]: Forbidden words or phrases.
      - `fields` string[]: Ad parts to check for terms.
      - `applies_to` 'unauthorized' | 'all_non_owned'
      - `authorized_domains` string[]
      - `extra_terms` string[]: Extra brand terms.
      - `codes` string[]: Forbidden promo codes.
      - `any_explicit_code` boolean: Also flag any other code written after the word code.
      - `allowed_codes` string[]
      - `top_positions` integer
      - `authorized_ids` string[]
    - `scope` object, nullable, required: Which observations the rule checks. null in a dimension means every value; values within a dimension combine with OR, dimensions with AND.
      - `engine` string[], nullable, required
      - `device` string[], nullable, required
      - `os` string[], nullable, required
      - `country` string[], nullable, required
      - `location` string[], nullable, required
    - `open_cases` integer, required
    - `created_at` string, required
    - `updated_at` string, required
  - `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)
