---
title: "Update a website-change monitor"
method: PATCH
path: "/monitors/{id}"
tags: ["Monitors"]
---

# Update a website-change monitor

`PATCH /monitors/{id}`

## Request

- Base URL: `https://api.crawlora.net/api/v1`
- URL: `https://api.crawlora.net/api/v1/monitors/{id}`
- Auth: API key in header `x-api-key`

Partially updates one of the caller's own monitors. Free to call. Changing `target_type` or `sitemap` resets the stored diff baseline (fingerprint, snapshot, or URL set), so the next check establishes a fresh baseline instead of comparing against a now-meaningless prior state.

## Path parameters

- `id` string, required

## Headers

- `Authorization` string
- `x-api-key` string

## Request body

- WebmonitorUpdateMonitorBodyDoc
  - `cadence_minutes` integer
  - `enabled` boolean
  - `name` string
  - `notification` WebmonitorNotificationBodyDoc
    - `events` string[]
    - `webhook_secret` string
    - `webhook_url` string
  - `sitemap` WebmonitorSitemapTargetBodyDoc
    - `exclude_patterns` string[]
    - `include_patterns` string[]
    - `max_urls` integer
  - `target_type` 'page' | 'sitemap'

## Response `200`

Updated monitor

- WebmonitorMonitorResponseDoc
  - `code` integer
  - `data` WebmonitorMonitorDoc
    - `cadence_minutes` integer
    - `created_at` string
    - `enabled` boolean
    - `failures` integer
    - `id` string
    - `last_changed_at` string
    - `last_checked_at` string
    - `last_error` string
    - `name` string
    - `next_check_at` string
    - `notification` WebmonitorNotificationDoc
      - `events` string[]
      - `webhook_url` string
    - `sitemap` WebmonitorSitemapTargetDoc
      - `exclude_patterns` string[]
      - `include_patterns` string[]
      - `max_urls` integer
    - `target_type` 'page' | 'sitemap'
    - `updated_at` string
    - `url` string
  - `msg` string

## Other responses

- `400`: Invalid parameters
- `401`: Authentication required
- `404`: Monitor not found
- `500`: Internal server error

---

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