Policy

What a draft rule would match, without saving it

Evaluates a draft rule against the project's saved checks over a date range (last 30 days by default, at most 92 days) and returns how many ads, advertisers and cases it would match, with up to 20 recent examples. Use this to check whether the rule is scoped as intended before create_policy_rule; nothing is saved and no case is opened. No matches means none in the saved checks, not that none happened. 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. 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.

post/projects/{project_id}/policy-rule-preview

Request

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

Path parameters

project_idstring 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

namestring

A name your team recognizes, up to 120 characters.

type'forbidden_terms' | 'brand_term' | 'direct_linking' | 'promo_code' | 'position_limit' | 'affiliate_id' required
range'7d' | '14d' | '30d' | '12m' | 'custom'

Window ending today: 7d, 14d, 30d (default) or 12m. Use custom with from and to for fixed dates.

fromstring

First local day, YYYY-MM-DD (custom range).

tostring

Last local day, YYYY-MM-DD, included in full (custom range).

time_zonestring

IANA time zone for day boundaries, such as America/New_York. Defaults to the time zone of the person the credential acts for.

Response

What a draft rule would match, without saving it

matched_adsinteger required
advertisersinteger required
casesinteger required

Cases the rule would open or update.

truncatedboolean required

True when only the first 20,000 saved ads were read.

request_idstring

Changes

No recorded changes to this operation across all 1 revision of this API.