---
title: "One policy rule"
method: GET
path: "/projects/{project_id}/policy-rules/{rule_id}"
tags: ["Policy"]
---

# One policy rule

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

## Request

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

Returns one policy rule of the project with its parameters and 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.
- `rule_id` string, required: The policy rule id from list_policy_rules.

## Response `200`

One policy rule

- object
  - `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)
