---
title: "Create a monitor"
method: POST
path: "/v1/sites/{siteId}/monitors"
tags: ["Sites"]
---

# Create a monitor

`POST /v1/sites/{siteId}/monitors`

## Request

- Base URL: `https://api.ironfang.com/audit`
- URL: `https://api.ironfang.com/audit/v1/sites/{siteId}/monitors`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

`mode` is `full_site` (crawler discovery under the site's crawl policy) or `url_set` (exactly the given `urls`, validated against the site's hosts, patterns and the public-target policy; the whole set is refused if any entry fails). `cadence` is `manual`, `daily`, `six_hourly` or `hourly`, open to every organisation; each scheduled run is admitted against `audit.capture` when its slot arrives, and a refused run is skipped with a `monitor.skipped` event whose `reason` is the billing code. `anchor_minute` is minutes past midnight in `timezone` for daily, or within the interval otherwise.

## Request body

- MonitorInput: `mode` is `full_site` (crawler discovery under the site's crawl policy) or `url_set` (exactly the given `urls`). Every `cadence` is open to every organisation; `manual` monitors only run when asked. `anchor_minute` is minutes past midnight in `timezone` for daily cadences, or minutes into the interval otherwise.
  - `anchor_minute` integer
  - `cadence` 'manual' | 'daily' | 'six_hourly' | 'hourly'
  - `capture_profile` CaptureProfile: Viewport and rendering settings for the monitor's evidence captures. Clamped to Ironfang Render's ceilings.
    - `color_scheme` 'light' | 'dark'
    - `device_scale_factor` number
    - `height` integer
    - `locale` string
    - `width` integer
  - `change_policy` ChangePolicy: When a page observation counts as changed.
    - `ignore_numbers` boolean
    - `ignored_selectors` string[]
    - `min_text_change` number: Fraction of text that must differ, 0-1.
    - `min_visual_change` number: Fraction of pixels that must differ, 0-1.
    - `notify_only_on_rule_change` boolean
  - `mode` 'full_site' | 'url_set', required
  - `name` string
  - `timezone` string: An IANA zone name, for example Europe/London.
  - `urls` string[]: Required for url_set on creation; ignored on update.

## Response `201`

Monitor with its URL set

## Other responses

- `422`: Problem response

---

[API](https://skmtc.dev/ironfang/apis/ironfang-audit-api.md) · [All operations](https://skmtc.dev/ironfang/apis/ironfang-audit-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ironfang/apis/ironfang-audit-api/revisions/7430deff2cbd?raw)
