{
  "api_version": "v1",
  "count": 2,
  "docs": "https://crocbot.net/for-bots/#services-json",
  "generated_at": "2026-11-16T11:27:29Z",
  "services": [
    {
      "auth": "POST /v1/monitor/tokens mints a bearer token (shown once) for checks, heartbeats, alerts and the summary; ping URLs need none (the key in the URL is the secret) and must be called with POST.",
      "available": true,
      "base_url": "https://api.crocbot.net/v1/monitor",
      "created_at": "2026-10-28T06:42:02Z",
      "description": "gulpd is [gulp](https://crocbot.net/tools/gulp/)'s checks as a hosted service run by crocbot.net: instead of running a checker on a schedule yourself, you register URLs, certificates and heartbeats once and read their state as JSON whenever you want.\n\n- Website checks: HTTP status, latency, redirects and the final URL, plus the TLS certificate of the site (days left, issuer, chain validity, name match), every 5 minutes to 24 hours.\n- Certificate checks: a `host:port` target gets only the TLS handshake, for mail servers and other TLS ports.\n- Heartbeats work the other way round: your cron job or bot POSTs to a ping URL when it runs (GET is no longer accepted), and gulpd marks the heartbeat late, then down, when the pings stop or a job reports a failure. A check or heartbeat can also push a signed webhook when its status changes.\n\nThere are no accounts: one POST mints a bearer token, and that token is the only identity. Response bodies of checked sites are never stored or returned, only status codes, timings and certificate facts.\n\nThe API is live at `https://api.crocbot.net/v1/monitor` (alpha: the interface may still gain fields, and the free tier is small). Health is at `/v1/monitor/health`. For one-off checks from your own machine, the free [gulp](https://crocbot.net/tools/gulp/) CLI runs the same checks locally.",
      "health_url": "https://api.crocbot.net/v1/monitor/health",
      "limits": "10 checks and 10 heartbeats per token, 5 new tokens per client address per day, 10 alert targets, 60 webhook deliveries per hour, checks every 5 min to 24 h (default 15 min), POST-only heartbeat pings, 30 days without use before everything expires.",
      "name": "gulpd",
      "slug": "gulpd",
      "status": "alpha",
      "status_url": "https://api.crocbot.net/v1/monitor/status",
      "summary": "Hosted uptime, TLS-expiry and heartbeat monitor for bots: register website and certificate checks or job heartbeats at api.crocbot.net, read their state as JSON.",
      "tags": [
        "monitoring",
        "uptime",
        "tls",
        "certificates",
        "heartbeat",
        "api"
      ],
      "updated_at": "2026-11-16T11:25:02Z",
      "url": "https://crocbot.net/services/gulpd/",
      "usage": "Base URL: `https://api.crocbot.net/v1/monitor`. Every route lives under `/v1/monitor/`. JSON in and out (`Content-Type: application/json`, at most 8 KiB); times are RFC 3339 UTC; every error is `{\"error\": \"<code>\", \"message\": \"<text>\"}`, plus `retry_after` (seconds, also sent as `Retry-After`) on `429` and `503`.\n\n## Quick start\n\n```\nB=https://api.crocbot.net/v1/monitor\n\n# 1. mint a token (shown only once; keep it)\ncurl -s -X POST $B/tokens\n# {\"token\":\"glp_3f9a…\",\"token_note\":\"shown only once; …\",\"created_at\":\"…\",\"limits\":{…}}\nTOKEN=glp_3f9a…\n\n# 2. watch a website (HTTP status 200-399 expected, certificate warning at 14 days left)\ncurl -s $B/checks -H \"Authorization: Bearer $TOKEN\" \\\n  -H 'Content-Type: application/json' -d '{\"target\":\"https://crocbot.net/\",\"name\":\"home\"}'\n\n# 3. watch only a certificate (host:port), hourly\ncurl -s $B/checks -H \"Authorization: Bearer $TOKEN\" \\\n  -H 'Content-Type: application/json' -d '{\"target\":\"api.crocbot.net:443\",\"interval_secs\":3600}'\n\n# 4. a heartbeat for an hourly job, with 5 minutes of grace\ncurl -s $B/heartbeats -H \"Authorization: Bearer $TOKEN\" \\\n  -H 'Content-Type: application/json' -d '{\"period_secs\":3600,\"grace_secs\":300,\"name\":\"backup\"}'\n# {\"id\":\"b657…\",\"status\":\"new\",\"ping_url\":\"https://api.crocbot.net/v1/monitor/ping/9258…\",…}\n\n# 5. from the job: POST a ping on success, or report a failure (GET returns 405)\ncurl -fsS -m 10 --retry 3 -X POST https://api.crocbot.net/v1/monitor/ping/9258…\ncurl -fsS -m 10 -X POST https://api.crocbot.net/v1/monitor/ping/9258…/fail\n\n# 5b. optional: a signed webhook when a check or heartbeat changes status\ncurl -s -X PUT $B/heartbeats/$HID/alert -H \"Authorization: Bearer $TOKEN\"   -H 'Content-Type: application/json' -d '{\"url\":\"https://bot.example.net/hooks/gulpd\"}'\n# {\"heartbeat_id\":\"…\",\"alert\":{…},\"secret\":\"gkw_…\",\"secret_note\":\"…\"}  (secret shown once)\n\n# 6. read the overall state, or one check with its history\ncurl -s $B/summary -H \"Authorization: Bearer $TOKEN\"\ncurl -s \"$B/checks/56a7…?limit=20\" -H \"Authorization: Bearer $TOKEN\"\n\n# 7. clean up one item, or the token with everything it owns\ncurl -s -X DELETE $B/checks/56a7… -H \"Authorization: Bearer $TOKEN\"\ncurl -s -X DELETE $B/tokens/self -H \"Authorization: Bearer $TOKEN\"\n# {\"deleted\":true,\"checks\":1,\"heartbeats\":1}\n```\n\n## Endpoints\n\n- `GET /v1/monitor/`: service index with endpoints and limits. No auth.\n- `GET /v1/monitor/health`: `{status, version, uptime_secs, time, database}`; `503` if the database is unreachable. `GET /v1/monitor/stats`: aggregate counts only, never targets or names.\n- `GET /v1/monitor/status`: the public status page (HTML): version, uptime, health, active checks and heartbeats against capacity, activity in the last 24 hours. Aggregate numbers only, nothing per token. No auth.\n- `POST /v1/monitor/tokens`: mint a token (`glp_` + 64 hex digits), answered `201`. No auth.\n- `DELETE /v1/monitor/tokens/self`: delete the calling token and everything it owns (checks with their history, heartbeats, events), answered `{\"deleted\": true, \"checks\": N, \"heartbeats\": N}`. The token and its ping URLs stop working at once; the deletion does not give back a new-token slot for the day. Bearer.\n- `GET /v1/monitor/summary`: the token's overall state: counts by status, the items that need attention, the soonest-expiring certificate. Bearer. `overall` is `empty` when the token has no checks and no heartbeats, `pending` when it has items but none has a result yet, otherwise the worst current status (`ok`, `warn`, `fail`, `error`; a late heartbeat counts as `warn`, a down one as `error`).\n- `GET /v1/monitor/checks`, `POST /v1/monitor/checks`: list (`{checks, count, limit}`) or add a check (`201` + `Location`; the first run is due at once). Bearer.\n- `GET /v1/monitor/checks/{id}`: one check with `history` (newest first; `?limit=1..500`, default 50) and its last 20 status `events`. `DELETE` removes it (`{deleted: id}`). Bearer, the owning token only.\n- `GET /v1/monitor/heartbeats`, `POST /v1/monitor/heartbeats`: list or add a heartbeat (`201` + `Location`; the response carries `ping_url`). Bearer.\n- `GET /v1/monitor/heartbeats/{id}`: one heartbeat with its last 20 status `events`. `DELETE` removes it, and its ping URL stops working. Bearer, the owning token only.\n- `POST /v1/monitor/ping/{key}`: record a successful ping; `POST .../ping/{key}/fail` records a failure (the heartbeat is `down` until the next successful ping). No auth: the key in the ping URL is the secret. POST bodies are ignored. `GET` on either path returns `405 method_not_allowed` and a message that says to use POST.\n- `PUT /v1/monitor/checks/{id}/alert` and `PUT /v1/monitor/heartbeats/{id}/alert`: set or replace the webhook target, body `{\"url\": \"https://...\"}`. Returns the new `secret` once (`201` new, `200` replaced; replacing rotates the secret). Bearer (owner). `DELETE` removes it. `POST .../alert/test` sends one `{kind}.test` event now (one attempt) and returns what was sent.\n\nAny authenticated request extends the expiry of all the token's checks and heartbeats to 30 days from then. A token unused for 30 days is deleted with everything it owns.\n\n## Check request\n\n- `target` (alias `url`, required): an `https://` or `http://` URL on port 80, 443, 8080 or 8443 for a website check, or `host:port` / `host` (port 443) for a certificate-only check on a TLS port (443, 465, 563, 636, 853, 989, 990, 992 to 995, 5061, 6697, 8443, 9443). At most 2048 ASCII characters (punycode for international names), no credentials.\n- `name`: up to 100 characters.\n- `interval_secs`: 300 to 86400, default 900.\n- `warn_days`: certificate expiry warning threshold, 0 to 365, default 14.\n- Website checks only: `expect`, the accepted HTTP statuses such as `\"200\"` or `\"200-299,401\"` (at most 10 ranges, default `\"200-399\"`); `method`, `\"GET\"` (default) or `\"HEAD\"`; `warn_ms`, warn when the response takes longer (1 to 10000).\n\nUnknown fields are rejected. The same token cannot add the same target with the same method twice (`409`).\n\n## The check object\n\n```\n{\"id\": \"56a75c74-…\", \"name\": \"home\", \"type\": \"url\", \"target\": \"https://crocbot.net/\",\n \"interval_secs\": 900, \"warn_days\": 14, \"status\": \"ok\", \"status_since\": \"2026-10-28T04:42:47Z\",\n \"last\": {\"at\": \"…\", \"status\": \"ok\", \"problems\": [], \"latency_ms\": 7, \"http_status\": 200,\n          \"final_url\": null, \"redirects\": 0,\n          \"tls\": {\"days_left\": 86, \"not_after\": \"2027-01-22T16:52:46Z\", \"issuer\": \"C=US, O=Let's Encrypt, CN=YE2\"},\n          \"error_kind\": null},\n \"next_run_at\": \"…\", \"run_count\": 1, \"created_at\": \"…\", \"expires_at\": \"…\",\n \"url\": \"https://api.crocbot.net/v1/monitor/checks/56a75c74-…\",\n \"method\": \"GET\", \"expect\": \"200-399\", \"warn_ms\": null,\n \"history\": [{\"at\", \"status\", \"latency_ms\", \"http_status\", \"tls_days_left\", \"problem\", \"error_kind\"}],\n \"events\": [{\"at\", \"from\": \"pending\", \"to\": \"ok\", \"detail\": null}]}\n```\n\n- `history` and `events` appear only on `GET /checks/{id}`. `final_url` is set when the URL redirected. `problems` holds up to 5 short human-readable reasons.\n- `pending`: not run yet. `ok`: everything as expected.\n- `warn`: works, but the certificate expires within `warn_days`, the response was slower than `warn_ms`, or https redirected to plain http.\n- `fail`: the target answered wrongly: a status outside `expect`; a certificate that is expired, not yet valid, untrusted or for another name; or a redirect to somewhere gulpd refuses to follow.\n- `error`: no answer; `error_kind` says why, e.g. `dns`, `connect`, `timeout`, `tls`.\n\n## Heartbeats\n\nRequest: `period_secs` (required), the expected time between pings, 60 to 604800 (7 days); `grace_secs`, extra time after a missed ping before it counts as down, 0 to 86400, default 300; `name`, up to 100 characters.\n\n```\n{\"id\": \"b657e246-…\", \"name\": \"backup\", \"status\": \"up\", \"status_since\": \"…\",\n \"period_secs\": 3600, \"grace_secs\": 300,\n \"ping_url\": \"https://api.crocbot.net/v1/monitor/ping/9258…\",\n \"last_ping_at\": \"…\", \"next_ping_due_at\": \"…\", \"down_at\": \"…\", \"last_fail_at\": null,\n \"ping_count\": 1, \"fail_count\": 0, \"created_at\": \"…\", \"expires_at\": \"…\",\n \"url\": \"https://api.crocbot.net/v1/monitor/heartbeats/b657e246-…\"}\n```\n\n- `new`: no ping yet. `up`: last ping within `period_secs`. `late`: past the period but within the grace time.\n- `down`: past period plus grace, or a `/fail` ping newer than the last successful one.\n- A ping answers `{\"ok\": true, \"recorded\": true, \"status\": \"up\", \"next_ping_due_at\": \"…\"}`. Pings of one heartbeat less than 5 s apart answer `\"recorded\": false` and are not written.\n\n## Webhooks\n\nWhen a check or heartbeat with an alert target changes status (not the first `pending`→`ok` or `new`→`up`), gulpd POSTs a small JSON event to it. Headers are `X-Gulpd-Event`, `X-Gulpd-Delivery`, `X-Gulpd-Timestamp` and `X-Gulpd-Signature: sha256=…` (HMAC-SHA256 over `<timestamp>.<raw body>` with the per-item secret, shown once). Events are `check.status` / `heartbeat.status`, or `check.test` / `heartbeat.test` from the test endpoint. Verify them the same way as lurkd's (`X-Gulpd-*`, 5-minute timestamp window, deduplicate on delivery id). Targets must be public `https://` URLs on port 443 (same address rules as lurkd), checked when the target is set and again on every delivery; no redirects; 5 s timeout; 3 attempts (10 s / 60 s backoff). The last delivery's outcome is on the item's `alert` object. The secret is never shown again.\n\n## Free-tier limits\n\n- 10 checks and 10 heartbeats per token; 5 new tokens per client address per day (`429` with `Retry-After`).\n- 500 active checks and 1000 active heartbeats for the whole service (`503` `capacity`).\n- Checks every 300 s at the most often, 900 s by default, 86400 s at the least; 10 s per run, all redirects included; up to 5 redirects.\n- 120 requests per token per minute (`429`). Request bodies up to 8 KiB.\n- History: the last 500 results or 7 days, whichever is fewer; 50 status events per item. Everything expires after 30 days without authenticated use.\n- Webhooks: 10 alert targets per token across checks and heartbeats; 60 deliveries per token per hour (a change over that is recorded as a failed delivery, not sent), of which at most 10 tests.\n\n## Safety\n\n- Targets must be public. Private, loopback, link-local, CGNAT, multicast, documentation and cloud-metadata addresses are refused, as are names like `localhost` and `*.internal` (`422` `target_refused`, or `dns_failed`).\n- Every address is checked when a target is added and again at every run, inside the resolver, so a name that later points somewhere private is refused, not connected to.\n- gulpd follows redirects itself, one hop at a time. Each hop is validated like a new target and loops are detected; a refused hop makes the run `fail`.\n- At most 3 checks run at once, with at least 2 s between runs against one host. Response bodies are never kept or returned.\n- Its User-Agent names the docs page, `https://crocbot.net/services/gulpd/`. Tokens are stored only as SHA-256 hashes.",
      "version": "0.2.0"
    },
    {
      "auth": "None to read a watch or its signed snapshot (its random id is the capability); POST /v1/watch/tokens, or creating a watch without one, mints a bearer token, shown once, needed to list, renew, delete or set webhooks.",
      "available": true,
      "base_url": "https://api.crocbot.net/v1/watch",
      "created_at": "2026-10-25T05:25:33Z",
      "description": "lurkd is [lurk](https://crocbot.net/tools/lurk/)'s change detection as a hosted service run by crocbot.net: instead of keeping snapshots yourself, you register an https URL once and either poll a small JSON document that says whether it changed, how often, and what the last change looked like as a unified diff, or let lurkd push a signed webhook to you when it changes.\n\nIt is built for bots that cannot keep state between runs or do not want to fetch the same page every hour themselves. There are no accounts: one POST mints a bearer token, and each watch has an unguessable id you can read without it. Comparison works exactly like lurk: the raw bytes, the visible text, or only the main readable content of a page, with whitespace normalized and optional ignore patterns for noisy lines. Since 0.2.0 every snapshot lurkd takes is signed with its ed25519 key, so anyone can check what lurkd saw and when.\n\nSince 0.3.0 you can also force a check now (`POST /v1/watch/watches/{id}/check`, Bearer, rate-limited, honors the host gap). Snapshot and watch JSON no longer carry a wildcard CORS header; curl and other non-browser clients are unaffected.\n\nThe API lives under `https://api.crocbot.net/v1/watch` (alpha: the interface may still gain fields, and the free tier is small). A human status page is at [/v1/watch/status](https://api.crocbot.net/v1/watch/status).",
      "health_url": "https://api.crocbot.net/v1/watch/health",
      "limits": "3 watches per token, 10 new watches per client address per 24 h, checked about hourly, 30 days per watch unless renewed; signed webhooks on every watch, 60 deliveries per token per hour.",
      "name": "lurkd",
      "slug": "lurkd",
      "status": "alpha",
      "status_url": "https://api.crocbot.net/v1/watch/status",
      "summary": "Hosted change watcher for bots: register an https URL at api.crocbot.net, poll JSON for its hash and last diff or get a signed webhook when it changes; every snapshot is ed25519-signed.",
      "tags": [
        "monitoring",
        "diff",
        "web",
        "webhook",
        "signing",
        "api"
      ],
      "updated_at": "2026-11-16T11:25:02Z",
      "url": "https://crocbot.net/services/lurkd/",
      "usage": "Base URL: `https://api.crocbot.net/v1/watch`. JSON in and out; every error is `{\"error\": \"<code>\", \"message\": \"<text>\"}`. Times are RFC 3339 UTC.\n\n## Quick start\n\n```\nB=https://api.crocbot.net/v1/watch\n\n# a token (shown only once)\nTOKEN=$(curl -s -X POST $B/tokens | jq -r .token)\n\n# a watch with a push alert; the alert secret is shown only once\ncurl -s $B/watches -H \"Authorization: Bearer $TOKEN\" -H 'Content-Type: application/json' \\\n  -d '{\"url\": \"https://example.com/pricing\", \"mode\": \"main-content\", \"alert_url\": \"https://bot.example.net/hooks/lurkd\"}'\n\n# poll it (no token needed: the random id is the capability)\ncurl -s $B/watches/$ID\n# the latest signed snapshot\ncurl -s $B/watches/$ID/snapshot\n\n# check it now (honors the host gap; 429 host_gap if too soon)\ncurl -s -X POST $B/watches/$ID/check -H \"Authorization: Bearer $TOKEN\"\n\n# send a test event to the alert target now\ncurl -s -X POST $B/watches/$ID/alert/test -H \"Authorization: Bearer $TOKEN\"\n\ncurl -s -X POST $B/watches/$ID/renew -H \"Authorization: Bearer $TOKEN\"\ncurl -s -X DELETE $B/watches/$ID -H \"Authorization: Bearer $TOKEN\"\ncurl -s -X DELETE $B/tokens/self -H \"Authorization: Bearer $TOKEN\"\n```\n\nWithout `Authorization`, `POST /v1/watch/watches` still mints a token and returns it once with the watch.\n\n## Endpoints\n\n- `POST /v1/watch/tokens`: mint a token, `201 {token, token_note}` (format `lkd_` + 64 hex digits). At most 10 per client address per 24 hours.\n- `DELETE /v1/watch/tokens/self`: delete the calling token and all its watches, `{\"deleted\": true, \"watches\": N}`.\n- `POST /v1/watch/watches`: create. Body `{\"url\", \"mode\"?, \"ignore_regex\"?, \"alert_url\"?}`. Optional Bearer token (without one, a new token is minted). Answers `201` with the watch and a `Location` header.\n- `GET /v1/watch/watches/{id}`: read one watch. Public for anyone who knows the id (a random UUIDv4).\n- `GET /v1/watch/watches`: the token's watches, `{count, max, watches}`. Needs the token.\n- `GET /v1/watch/watches/{id}/snapshot`: the latest signed snapshot (below). `404 no_snapshot` before the first check that fetched the page.\n- `POST /v1/watch/watches/{id}/check`: run a check now, honoring the same per-host gap as the scheduler. Bearer (owner). Answers the updated watch (and snapshot). `429 host_gap` with `retry_after` if that host was checked too recently.\n- `POST /v1/watch/watches/{id}/renew`: extend the expiry to 30 days from now. Needs the owning token.\n- `DELETE /v1/watch/watches/{id}`: delete, `{\"deleted\": true, \"id\"}`. Needs the owning token.\n- `PUT /v1/watch/watches/{id}/alert`: set or replace the webhook target, body `{\"url\": \"https://...\"}`. Returns the new `secret` once (`201` new, `200` replaced; replacing rotates the secret). Needs the owning token.\n- `DELETE /v1/watch/watches/{id}/alert`: remove the webhook target. Needs the owning token.\n- `POST /v1/watch/watches/{id}/alert/test`: send one `watch.test` event now (one attempt) and return what was sent (`sent.headers`, `sent.body`) and the outcome. Needs the owning token.\n- `GET /v1/watch/pubkey`: the snapshot signing key, `{algorithm: \"ed25519\", key_id, public_key, public_key_pem, record_format}`; `GET /v1/watch/pubkey.pem` is the PEM alone.\n- `GET /v1/watch/health`, `GET /v1/watch/stats` (aggregate counts, never URLs), `GET /v1/watch/` (index with limits), `GET /v1/watch/status` (human status page).\n\nResponses no longer send `Access-Control-Allow-Origin: *`. Browser pages cannot read watch or snapshot JSON cross-origin; curl and other non-browser clients are unaffected.\n\nRequests with a token count against 60 per token per minute.\n\n## Request fields\n\n- `url` (required): an `https://` URL on port 443, without `user:password@`, at most 2048 ASCII characters (percent-encode, use punycode for international names).\n- `mode`: `raw` (the bytes as fetched), `text` (visible text of HTML) or `main-content` (the main readable content, as [chomp](https://crocbot.net/tools/chomp/) extracts it). Default `main-content`. Non-HTML text is compared as text, binary content by its bytes.\n- `ignore_regex`: one pattern or a list of up to 5, at most 200 characters each, Rust regex syntax in multi-line mode (`^` and `$` match at line ends). Matches are removed before hashing, for example `\"^Updated \\\\d+ minutes ago$\"`.\n- `alert_url`: a webhook target, same rules as `PUT .../alert`. The response then carries `alert_secret`, shown once. If the alert cannot be set (refused address, alert limit), no watch is created.\n\nUnknown fields are rejected. The body must be `Content-Type: application/json` and at most 8 KiB.\n\n## The watch object\n\n```\n{\"id\": \"0b6f…\", \"url\": \"https://example.com/pricing\", \"mode\": \"main-content\", \"ignore_regex\": [],\n \"created_at\": \"2026-10-25T05:00:00Z\", \"expires_at\": \"2026-11-24T05:00:00Z\",\n \"last_checked_at\": \"…\", \"next_check_at\": \"…\", \"last_changed_at\": \"…\",\n \"content_sha256\": \"sha256:4f0c…\", \"changed_count\": 1, \"check_count\": 2,\n \"last_status\": 200, \"last_error\": null, \"final_url\": null,\n \"diff\": \"--- previous\\n+++ current\\n@@ -3 +3 @@\\n-Pro: $20\\n+Pro: $25\\n\",\n \"snapshot\": {\"fetched_at\": \"…\", \"status\": 200, \"content_sha256\": \"sha256:4f0c…\",\n              \"signature\": \"…\", \"key_id\": \"d99b34dd9c3409b3\", \"url\": \"https://api.crocbot.net/v1/watch/watches/0b6f…/snapshot\"},\n \"alert\": {\"url\": \"https://bot.example.net/hooks/lurkd\", \"created_at\": \"…\", \"deliveries_ok\": 1, \"deliveries_failed\": 0,\n           \"last_delivery\": {\"event\": \"watch.changed\", \"delivery_id\": \"…\", \"at\": \"…\", \"ok\": true, \"http_status\": 204, \"attempts\": 1, \"error\": null}},\n \"status_url\": \"https://api.crocbot.net/v1/watch/watches/0b6f…\"}\n```\n\n- The first check runs right after creation and sets the baseline; it is not a change.\n- `changed_count` counts checks whose hash differed from the one before. `diff` belongs to the latest change and is capped at 60 lines and 8 KiB.\n- `last_status` is the HTTP status of the last check (`304` when a conditional request found nothing new). `last_error` is set when the last check failed; the previous hash is kept.\n- `snapshot` is the signed record of the last check that fetched the page; `null` until there is one. `alert` is `null` without a webhook target; its secret is never shown again.\n\n## Webhooks\n\nWhen a check finds a change on a watch with an alert target, lurkd POSTs this to it:\n\n```\nPOST /hooks/lurkd\nContent-Type: application/json\nUser-Agent: lurkd/0.3.0 (+https://crocbot.net/services/lurkd/)\nX-Lurkd-Event: watch.changed\nX-Lurkd-Delivery: 5f2d…          (the same on every retry of one event)\nX-Lurkd-Timestamp: 1793178072    (Unix seconds of this attempt)\nX-Lurkd-Signature: sha256=9b1e…  (hex HMAC-SHA256)\n\n{\"event\":\"watch.changed\",\"delivery_id\":\"5f2d…\",\"watch_id\":\"0b6f…\",\"url\":\"https://example.com/pricing\",\n \"old_sha256\":\"sha256:4f0c…\",\"new_sha256\":\"sha256:a917…\",\"changed_at\":\"2026-10-28T09:01:12Z\",\"changed_count\":2,\n \"sent_at\":\"2026-10-28T09:01:12Z\",\"snapshot\":{…},\"watch_url\":\"https://api.crocbot.net/v1/watch/watches/0b6f…\"}\n```\n\nThe diff is not in the event; fetch `watch_url` for it. `watch.test` events have the same shape with `old_sha256` equal to `new_sha256` and `changed_at: null`.\n\nVerify every delivery: HMAC-SHA256 with the watch's secret over the `X-Lurkd-Timestamp` value, a dot, and the raw body bytes exactly as received; compare in constant time with the hex after `sha256=`, reject timestamps more than 5 minutes from your clock, and deduplicate on `X-Lurkd-Delivery`.\n\n```\nimport hmac, hashlib, time\ndef verify(secret: str, headers, body: bytes) -> bool:\n    ts = headers[\"X-Lurkd-Timestamp\"]\n    want = \"sha256=\" + hmac.new(secret.encode(), ts.encode() + b\".\" + body, hashlib.sha256).hexdigest()\n    return abs(time.time() - int(ts)) <= 300 and hmac.compare_digest(want, headers[\"X-Lurkd-Signature\"])\n```\n\n- Targets follow the same address rules as watched URLs (below), checked when the target is set and again on every delivery.\n- Redirects are not followed (a `3xx` is a failure); any `2xx` is success. 5 s timeout per attempt; the response body is ignored.\n- Up to 3 attempts, retried after 10 s and 60 s on network errors, timeouts, `408`, `429` and `5xx`; other `4xx` are final. Each attempt is signed with its own timestamp.\n- Retries are held in memory: a retry pending when lurkd restarts is dropped (the change is still in the watch's JSON).\n\n## Signed snapshots\n\nEvery check that fetched the page signs this record with lurkd's ed25519 key (UTF-8, a newline after every line):\n\n```\nlurkd-snapshot-v1\nwatch_id=0b6f2c8e-…\nurl=https://example.com/pricing\nfetched_at=2026-10-28T09:01:12Z\ncontent_sha256=sha256:a917…\nstatus=200\n```\n\nThe public key (key id `d99b34dd9c3409b3`; pin it rather than fetching it next to the snapshot you check):\n\n```\n-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAvIKM9zvc+qCZmh22G35uBMKKkmrhbteJLKddWByGu/A=\n-----END PUBLIC KEY-----\n```\n\nAs raw base64 (32 bytes): `vIKM9zvc+qCZmh22G35uBMKKkmrhbteJLKddWByGu/A=`. The `/snapshot` response holds the fields, the exact `signed_record`, the base64 `signature`, `key_id`, `public_key` and the normalized `text` that `content_sha256` hashes (when kept; binary or very large pages keep only the hash). Save the PEM above as `lurkd.pem`, rebuild the record from the fields rather than trusting `signed_record`, then check it (`Signature Verified Successfully`; the last line must print the hex of `content_sha256`):\n\n```\ncurl -s $B/watches/$ID/snapshot > snap.json\njq -j '\"lurkd-snapshot-v1\\nwatch_id=\\(.watch_id)\\nurl=\\(.url)\\nfetched_at=\\(.fetched_at)\\ncontent_sha256=\\(.content_sha256)\\nstatus=\\(.status)\\n\"' snap.json > record.txt\njq -r .signature snap.json | base64 -d > sig.bin\nopenssl pkeyutl -verify -pubin -inkey lurkd.pem -rawin -in record.txt -sigfile sig.bin\njq -j .text snap.json | sha256sum\n```\n\nA signature says lurkd fetched this URL at this time, got this status, and the normalized content hashed to this. It does not vouch for the content itself, and only the latest snapshot is kept.\n\n## Error codes\n\n- `400` `invalid_json`, `invalid_url`, `invalid_mode`, `invalid_regex`\n- `401` `missing_token`, `invalid_token`; `403` `forbidden` (not your watch), `watch_limit` or `alert_limit`\n- `404` `not_found` (unknown, expired or deleted), `no_snapshot`, `no_alert`; `409` `duplicate` (same url, mode and ignores on this token)\n- `413` `body_too_large`; `415` `unsupported_media_type`\n- `422` `url_refused` (scheme, port, credentials, private or reserved address, local name) or `dns_failed`\n- `429` `rate_limited` or `host_gap` with `Retry-After`; `503` `capacity` with `Retry-After`\n\n## Free-tier limits\n\n- 3 watches per token; 10 new watches and 10 new tokens per client address per 24 hours (IPv6 counted per /64); 500 active watches in total; 60 requests per token per minute.\n- Checked about hourly (±10% jitter), at most one request per host at a time and 30 s apart, with conditional requests. One host can therefore be checked about 120 times an hour; if more watches point at the same host, their checks drift later than hourly (served in order, nothing skipped).\n- Responses up to 2 MiB, 15 s timeout, up to 5 redirects (each hop is checked again).\n- Webhooks: every watch of a token may have one; 60 deliveries per token per hour (a change over that is recorded as a failed delivery, not sent), of which at most 10 tests.\n- Watches expire after 30 days unless renewed; expired watches are deleted.\n\n## Safety\n\nlurkd only contacts public `https://` addresses, for fetches and webhooks alike. Every address a host name resolves to must be public, when the watch or alert is set and on every fetch, redirect hop and delivery, so private, loopback, link-local, CGNAT, multicast and reserved IPv4 and IPv6 ranges are never contacted. Its User-Agent is `lurkd/VERSION (+https://crocbot.net/services/lurkd/)`. Tokens are stored only as SHA-256 hashes; the signing key never leaves the server.",
      "version": "0.3.0"
    }
  ],
  "statuses": [
    "coming-soon",
    "alpha",
    "beta",
    "stable",
    "deprecated"
  ]
}
