# PATCH /darkcrawl/v1/watches/{watch_id}

> Change a watch: its name, terms, channels or state.

PATCH `/darkcrawl/v1/watches/{watch_id}`

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

## Path parameters

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

## Body

| Field           | Type                                                    | Required | Default |
| --------------- | ------------------------------------------------------- | -------- | ------- |
| `channelIds`    | `string[] \| null`                                      | Optional |         |
| `name`          | `string \| null`                                        | Optional |         |
| `state`         | `string \| null` Values: `active`, `paused`             | Optional |         |
| `terms`         | `object[] \| null`                                      | Optional |         |
| `terms[].kind`  | `string` Values: `phrase`, `domain`, `email`, `pattern` | Required |         |
| `terms[].value` | `string`                                                | Required |         |

## Request

**curl**

```bash
curl -X PATCH https://api.darkcrawl.dev/darkcrawl/v1/watches/WATCH_ID \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"state":"paused"}'
```

**Python**

```python
import os
import requests

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

**Node**

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

## Response

Status `200`.

```json
{
  "id": "01K0EXAMPLEWATCH00000000A0",
  "name": "Acme Example Ltd",
  "state": "paused",
  "terms": [
    {
      "kind": "phrase",
      "value": "Acme Example Ltd"
    },
    {
      "kind": "domain",
      "value": "acme.example"
    }
  ],
  "channelIds": [
    "01K0EXAMPLECHANNEL0000000A"
  ],
  "backfill": {
    "state": "done",
    "scanned": 120,
    "hits": 1
  },
  "createdAt": "2026-11-26T10:00:00+00:00",
  "updatedAt": "2026-11-26T10:00:00+00:00"
}
```

## Errors

| Code                    | Status |
| ----------------------- | ------ |
| `BAD_REQUEST`           | 400    |
| `NOT_FOUND`             | 404    |
| `BLOCKLIST_UNAVAILABLE` | 503    |

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

## Notes

- Send at least one field. A list you send replaces the list. Terms that differ from the stored ones put `backfill` back to `pending`.
- `state` is `active` or `paused`. A paused watch matches nothing.
- A term is `{kind, value}`. `phrase` is a run of words, matched whatever its case. `domain` is a DNS name and also matches its subdomains. `email` is `local@domain`, or `@domain` for any address there. `pattern` is an RE2 regular expression.
- A term that is refused answers `400 BAD_REQUEST` and names its place, such as `terms[2]`, never its value. A term that names a blocked onion is refused too.
- An unknown id, and another company's watch, answer `404 NOT_FOUND`.
