# PATCH /v2/monitor/{monitor_id}

> Change a monitor. Only the fields you send change.

PATCH `/v2/monitor/{monitor_id}`

**Authentication:** your key as a [bearer token](https://darkcrawl.dev/docs/api-reference/authentication/).

## Path parameters

| Field        | Type     | Required | Default |
| ------------ | -------- | -------- | ------- |
| `monitor_id` | `string` | Required |         |

## Body

| Field                     | Type                                                                 | Required | Default |
| ------------------------- | -------------------------------------------------------------------- | -------- | ------- |
| `channelIds`              | `string[] \| null`                                                   | Optional |         |
| `goal`                    | `string \| null`                                                     | Optional |         |
| `judgeEnabled`            | `boolean \| null`                                                    | Optional |         |
| `name`                    | `string \| null`                                                     | Optional |         |
| `notification`            | `object \| null`                                                     | Optional |         |
| `notification.email`      | `object \| null`                                                     | Optional |         |
| `notification.slack`      | `object \| null`                                                     | Optional |         |
| `retentionDays`           | `integer \| null`                                                    | Optional |         |
| `schedule`                | `object \| null`                                                     | Optional |         |
| `status`                  | `string \| null` Values: `active`, `paused`                          | Optional |         |
| `targets`                 | `object[] \| null`                                                   | Optional |         |
| `targets[].type`          | `string` Values: `scrape`, `crawl`, `search`                         | Required |         |
| `targets[].id`            | `string \| null`                                                     | Optional |         |
| `targets[].scrapeOptions` | `object \| null`                                                     | Optional |         |
| `targets[].urls`          | `string[]`                                                           | Optional |         |
| `targets[].crawlOptions`  | `object \| null`                                                     | Optional |         |
| `targets[].url`           | `string`                                                             | Optional |         |
| `targets[].maxResults`    | `integer`                                                            | Optional | `10`    |
| `targets[].queries`       | `string[]`                                                           | Optional |         |
| `targets[].sources`       | `string[] \| null` Values: `ahmia`, `captures`                       | Optional |         |
| `webhook`                 | `string \| object \| null`                                           | Optional |         |
| `webhook.url`             | `string`                                                             | Required |         |
| `webhook.events`          | `string[] \| null` Values: `monitor.page`, `monitor.check.completed` | Optional |         |
| `webhook.headers`         | `object \| null`                                                     | Optional |         |
| `webhook.metadata`        | `object \| null`                                                     | Optional |         |

Firecrawl compatibility fields

Firecrawl fields DarkCrawl does not offer. It takes them so the Firecrawl SDKs keep working, then ignores or refuses each one as the table says.

| Field                      | What DarkCrawl does                   |
| -------------------------- | ------------------------------------- |
| `origin`                   | Accepted and ignored.                 |
| `targets[].excludeDomains` | Answers 400 NOT_IMPLEMENTED when set. |
| `targets[].includeDomains` | Answers 400 NOT_IMPLEMENTED when set. |
| `targets[].searchWindow`   | Accepted and ignored.                 |

## Request

**curl**

```bash
curl -X PATCH https://api.darkcrawl.dev/v2/monitor/MONITOR_ID \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"paused"}'
```

**Python**

```python
import os
import requests

resp = requests.patch(
    "https://api.darkcrawl.dev/v2/monitor/MONITOR_ID",
    headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
    json={
        "status": "paused",
    },
    timeout=330,
)
print(resp.json())
```

**Node**

```javascript
const resp = await fetch("https://api.darkcrawl.dev/v2/monitor/MONITOR_ID", {
  method: "PATCH",
  headers: {
    Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "status": "paused"
  }),
  signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());
```

## Response

Status `200`.

```json
{
  "success": true,
  "data": {
    "id": "01K0EXAMPLEMONITOR0000000A",
    "name": "Notice board",
    "status": "paused",
    "schedule": {
      "cron": "0 */6 * * *",
      "timezone": "Europe/Berlin"
    },
    "nextRunAt": null,
    "lastRunAt": null,
    "currentCheckId": null,
    "targets": [
      {
        "id": "01K0EXAMPLETARGET00000000A",
        "type": "scrape",
        "urls": [
          "http://exampleonionq7x2mfk4lzr5w3ty6hbnc2jdu7avs4ekp5gw3xmlq2zr.onion/notice"
        ],
        "scrapeOptions": {}
      }
    ],
    "webhook": null,
    "notification": {},
    "emailRecipientSubscriptions": [],
    "retentionDays": 30,
    "estimatedCreditsPerMonth": 0,
    "lastCheckSummary": null,
    "goal": null,
    "judgeEnabled": false,
    "channelIds": [],
    "createdAt": "2026-11-26T10:00:00.000000+00:00",
    "updatedAt": "2026-11-26T10:00:00.000000+00:00"
  }
}
```

## Errors

| Code                    | Status |
| ----------------------- | ------ |
| `BAD_REQUEST`           | 400    |
| `NOT_IMPLEMENTED`       | 400    |
| `INVALID_ONION`         | 400    |
| `POLICY_FORBIDDEN`      | 400    |
| `BLOCKLISTED`           | 403    |
| `BLOCKLIST_UNAVAILABLE` | 503    |
| `SECRETS_UNAVAILABLE`   | 503    |
| `NOT_FOUND`             | 404    |

What each code means, and what to do about it: [Errors](https://darkcrawl.dev/docs/api-reference/errors/).

## Notes

- A paused monitor has no `nextRunAt`. A body that changes nothing is `400 BAD_REQUEST` with the message `Update body cannot be empty`. `targets` replaces the whole list. `null` is refused, except for `webhook`, `notification` and `goal`, where it removes the value.
- A `scrape` target takes `urls`, a `crawl` target one `url` with `crawlOptions`, and a `search` target `queries`. The [Monitor guide](https://darkcrawl.dev/docs/endpoints/monitor/) has the options of each.
- `schedule` is `{"cron": ...}` or `{"text": ...}`, with an optional `timezone`. It comes back as the cron it becomes.
- An unknown id, and another company's monitor, answer `404 NOT_FOUND`.
