Skip to main content
You want one message a day that says which watched pages changed and why it matters, not an alert for every edit. A monitor reads the pages and judges each change against your goal. A receiver stores the events. A small job turns them into the digest. You need an API key in STOPHY_API_KEY and a public address that can take a POST. See the Quickstart. A page checked once a day costs $0.03 a month.

1. Create the monitor

goal says what matters, so the judge can mark noise. webhook says where events go. This request watches a page that returns a new identifier on every read, so a change is certain. Replace the page with one you care about, and the example address with your receiver. The schedule is monthly so this test costs almost nothing. Use { "text": "daily" } for a real digest.
The answer holds the monitor’s id, here mon_2f3L73izJTdaA1AQ, with judgeEnabled: true because you sent a goal. Keep the id in MONITOR_ID for the next steps. The first check starts at once and reads the page for the first time. It sends monitor.check.completed and no monitor.page. See Targets.

2. Receive and store events

Get your signing secret once with POST /v1/webhook/secret and keep it in STOPHY_WEBHOOK_SECRET on your server. Verify every call, store it, and answer 200. The receiver is the one from Webhooks, with verify.ts next to it. It stores each body once, so a call Stophy sends again changes nothing.
A monitor event has no id of its own, and the id field is the monitor’s, so the hash of the body is the key. A retry sends the same bytes.

3. See a change

The first check only sets the baseline. To get a change now, run a check by hand.
The check starts within a minute. The page has changed, so your receiver gets a monitor.page call. This is the real body, with the judgment of the goal.
The check cost $0.002: $0.001 for the page and 0.001forthejudge.‘GET/v1/monitor/0.001 for the judge. `GET /v1/monitor/MONITOR_ID/checks/$CHECK_ID` shows the same result with the diff, whether or not your receiver was up. See Checks and changes.

4. Build the digest

The digest job runs once a day from your scheduler, such as cron. It reads the stored events, keeps the monitor.page events from the last day, drops the ones the judge called not meaningful, and prints one line per change with the judge’s reason.
Called with the stored events of the run above, it returned:
With a since after the change, and with the same event marked meaningful: false, it returned No changes worth reading in this window. Send the text wherever you read your day: email, a chat message or a file.

5. Catch what you missed

A receiver can be down. Once a day, before you build the digest, read the deliveries that failed and send them again.
For each id in data.deliveries, call POST /v1/webhook/deliveries/{id}/retry. A retry works for 7 days, and your receiver ignores a body it has already stored. Pages that could not be read are not events. They show as error in GET /v1/monitor/{id}/changes. See Webhooks.

6. Clean up

A monitor bills on its schedule until you remove it. Delete the test monitor, then point a new one at your pages.

What to check

  • GET /v1/monitor/$MONITOR_ID/checks shows a completed first check, and your table has its monitor.check.completed event.
  • A call with a wrong signature gets 401 and stores nothing. The same call twice stores one row.
  • The digest lists the changes you made and leaves out a change the judge called noise.
  • GET /v1/monitor/limits shows the monitors and pages you use, so you know how many more fit.
  • GET /v1/webhook/deliveries?status=failed is empty on a normal day.

What it costs

estimatedCostUsdPerMonth on the monitor shows its cost at the current schedule. See Monitors.
  • Targets watches a whole section or a search instead of one page.
  • Monitor webhooks lists every event and its fields.
  • Webhooks explains signatures, retries and replay.
  • Schedules sets how often a monitor checks.