---
title: "Switch on monitoring"
method: POST
path: "/v1/domains/{domainId}/monitoring"
tags: ["Monitoring"]
---

# Switch on monitoring

`POST /v1/domains/{domainId}/monitoring`

## Request

- Base URL: `https://api.ironfang.com/security`
- URL: `https://api.ironfang.com/security/v1/domains/{domainId}/monitoring`
- Auth: HTTP bearer

Only for a verified, authorised domain, within the organisation's monitored-domain limit. The first scheduled check runs within a few minutes unless a full check finished in the last day.

## Request body

- object
  - `frequency` 'daily' | 'weekly', required

## Response `201`

Monitoring is on.

- Monitoring
  - `available` boolean, required: Whether monitoring can be switched on or changed now.
  - `consecutive_failures` integer, required
  - `domain` string, required
  - `domain_id` string, uuid, required
  - `frequencies` MonitoringFrequency[], required: The frequencies this organisation may choose.
  - `frequency` 'daily' | 'weekly'
  - `health` 'healthy' | 'delayed' | 'attention' | 'paused' | 'off', required: healthy; delayed (a scheduled check is waiting on Ironfang's capacity); attention (recent scheduled checks could not complete); paused; off.
  - `last_completed_at` string, date-time, nullable
  - `last_scheduled_at` string, date-time, nullable
  - `last_successful_scan_id` string, uuid, nullable
  - `next_run_at` string, date-time, nullable
  - `schedule` string, nullable: When checks run, e.g. "Tuesdays around 03:17 UTC".
  - `state` 'off' | 'pending_first_run' | 'active' | 'paused' | 'paused_verification_lost' | 'paused_authorisation' | 'paused_repeated_failures' | 'paused_by_ironfang', required: off (never switched on, or switched off), pending_first_run, active, paused (by the customer), paused_verification_lost, paused_authorisation, paused_repeated_failures, paused_by_ironfang.
  - `state_reason` string, nullable: Why monitoring is paused, in words the customer can act on.
  - `unavailable_reason` string, nullable
  - `usage` object, required
    - `max` integer, required
    - `used` integer, required

## Other responses

- `409`: An error.
- `default`: An error.

---

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