# POST /darkcrawl/v1/watches

> Create a watch: words to look for in new pages, and the channels to tell.

POST `/darkcrawl/v1/watches`

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

## Body

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

## Request

**curl**

```bash
curl -X POST https://api.darkcrawl.dev/darkcrawl/v1/watches \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Acme Example Ltd","terms":[{"kind":"phrase","value":"Acme Example Ltd"},{"kind":"domain","value":"acme.example"}],"channelIds":["01K0EXAMPLECHANNEL0000000A"]}'
```

**Python**

```python
import os
import requests

resp = requests.post(
    "https://api.darkcrawl.dev/darkcrawl/v1/watches",
    headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
    json={
        "name": "Acme Example Ltd",
        "terms": [
            {
                "kind": "phrase",
                "value": "Acme Example Ltd",
            },
            {
                "kind": "domain",
                "value": "acme.example",
            },
        ],
        "channelIds": ["01K0EXAMPLECHANNEL0000000A"],
    },
    timeout=330,
)
print(resp.json())
```

**Node**

```javascript
const resp = await fetch("https://api.darkcrawl.dev/darkcrawl/v1/watches", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Acme Example Ltd",
    "terms": [
      {
        "kind": "phrase",
        "value": "Acme Example Ltd"
      },
      {
        "kind": "domain",
        "value": "acme.example"
      }
    ],
    "channelIds": [
      "01K0EXAMPLECHANNEL0000000A"
    ]
  }),
  signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());
```

## Response

Status `201`.

```json
{
  "id": "01K0EXAMPLEWATCH00000000A0",
  "name": "Acme Example Ltd",
  "state": "active",
  "terms": [
    {
      "kind": "phrase",
      "value": "Acme Example Ltd"
    },
    {
      "kind": "domain",
      "value": "acme.example"
    }
  ],
  "channelIds": [
    "01K0EXAMPLECHANNEL0000000A"
  ],
  "backfill": {
    "state": "pending",
    "scanned": 0,
    "hits": 0
  },
  "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    |
| `QUOTA_EXCEEDED`        | 402    |
| `BLOCKLIST_UNAVAILABLE` | 503    |

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

## Notes

- The reply is `201` with the watch. `backfill` shows the one check of the pages already stored: `pending` until it starts, then `running`, then `done` (or `failed`). Its hits are marked `backfill: true` and raise no alert.
- 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.
- Every `channelIds` entry must be one of your alert channels, else `404 NOT_FOUND`. A watch with no channels records hits and sends nothing.
- A company can keep as many watches as its plan allows. At the limit the call is `402 QUOTA_EXCEEDED`, with `details` of `{"limit": "watches", "max": ...}`. A watch costs no pages. See [Rate limits](https://darkcrawl.dev/docs/api-reference/rate-limits/).
