Skip to content

Watches

PATCH /darkcrawl/v1/watches/{watch_id}

Copy page

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

PATCH /darkcrawl/v1/watches/{watch_id}

Authentication: your key as a bearer token.

Path parameters

FieldTypeRequiredDefault
watch_idstringRequired

Body

FieldTypeRequiredDefault
channelIdsstring[] | nullOptional
namestring | nullOptional
statestring | null Values: active, pausedOptional
termsobject[] | nullOptional
terms[].kindstring Values: phrase, domain, email, patternRequired
terms[].valuestringRequired

Request

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"}'

Response

Status 200.

Response
{
  "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

CodeStatus
BAD_REQUEST400
NOT_FOUND404
BLOCKLIST_UNAVAILABLE503

What each code means, and what to do about it: 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.