Capture on Publish

If you own a website, WRL can keep a signed record of it: each page captured when it is published or updated, so you can show what it said on a given day. You set up a site once; after that, three things start captures:

  • The publish hook: a secret URL your deploy platform, CMS or workflow calls after a change.
  • The daily check: once a day WRL reads your sitemap and captures the pages it has no capture of yet, and the pages whose last-modified date is later than their latest capture. A daily check runs once the site's last check is 24 hours old, so the first one runs within a few minutes of turning it on, unless the site was checked in the last 24 hours. It captures up to maxCapturesPerCheck pages.
  • The API or MCP: POST /v1/sites/{host}/check or the check_site tool, for scripts and agents.

Each capture counts against your quota like any other and is signed and verifiable the same way.

Set up a site

In the dashboard, open Sites and choose Add a site: enter the address, and WRL reads the sitemap, shows how many pages it lists and what capturing them costs, then captures them in the background and turns on the daily check. When every page is captured already, it offers Turn on the daily check instead. That starts no first run, but the first daily check runs within a few minutes and captures the pages whose <lastmod> is later than their latest capture. When the sitemap of a name like example.com can't be read, it offers www.example.com, since some sites serve their sitemap only there. For a site that is set up already, it says how (daily check, hook, cap per check) and links to the site's page instead of offering a first run. A site's Settings page holds the fields below, the publish hook (create, copy, replace, turn off) and a Check the sitemap now button.

With the API:

curl -X PUT https://api.webresourceledger.com/v1/sites/example.com \
  -H "Authorization: Bearer $WRL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"dailyCheck": true}'
Field Default Description
sitemapUrl https://{host}/sitemap.xml Your sitemap. Must be on the same host
dailyCheck false Check the sitemap once a day
maxCapturesPerCheck 100 The most captures one check starts, 1 to 1,000
hookDelaySeconds 60 How long pages named in a hook call wait before WRL captures them, 0 to 600

Send only the fields you want to change. GET /v1/sites/example.com shows the settings with the result of the last check; DELETE /v1/sites/example.com removes them and the hook, and keeps the captures. Your account can have settings for 10 sites.

To record all pages once at the start with the API, ask for a check with POST /v1/sites/{host}/check and the body {"maxCaptures": 300} (up to 1,000), or capture them with the batch API. maxCaptures applies to that one check; later checks go back to maxCapturesPerCheck. Add a site in the dashboard does the same. When its first run can't take every page (more than 1,000, or more than your free captures), it says so: the daily check it turns on captures the other pages, up to maxCapturesPerCheck each time. When the captures of such a first run are done, an email says how many pages were captured and how many failed (First run of a site on the Notifications page).

Create the publish hook

curl -X POST https://api.webresourceledger.com/v1/sites/example.com/hook \
  -H "Authorization: Bearer $WRL_API_KEY"
{
  "host": "example.com",
  "hookUrl": "https://api.webresourceledger.com/v1/hooks/site/wrlh_3q8Zk0N2pY7vJm5xQe1RtUw9sLb4hGd6aCf2KiEo8Tn",
  "note": "This URL is shown once. ..."
}

WRL shows the URL once and keeps only a hash of it. Store it where your platform keeps secrets. Calling the endpoint again creates a new URL and the old one stops working; DELETE /v1/sites/example.com/hook removes it.

The hook takes no API key: the URL is the secret. Deploy platforms and CMSes can post to a URL, but most can't send a custom Authorization header, so this works with all of them.

Call it without URLs: a check

Most deploy notifications describe the deploy, not the pages. Post a body without a list of URLs (or nothing) and WRL runs a check:

curl -X POST "$WRL_HOOK_URL"
{ "site": "example.com", "mode": "check", "status": "queued" }

A check reads your sitemap (up to 5,000 URLs from up to 50 child sitemaps), keeps the URLs on your host, and captures the pages your account has no capture of yet, then the pages whose <lastmod> is later than their latest capture, most recently changed first, up to maxCapturesPerCheck. A check starts within about a minute of the call. A site gets at most one check every 5 minutes, so a call that comes sooner after the last check waits until then: ten deploys in a row cost one or two checks, and the next check covers the calls in between.

A webhook for site.check_complete tells you the result of each check.

A check finds an edited page only through its <lastmod>. A date without a time counts from the start of that day in UTC, so a check misses an edit made on a day when the page already has a capture, until <lastmod> moves to a later day. When your sitemap has no <lastmod>, or stamps every page with the time of the build, name the edited pages in the call instead. GET /v1/sites/{host} shows what the last check found under settings.lastCheck: newPages, changedPages, withLastmod (pages with a date) and allStamped (more pages changed at once than one check takes, and more than half of them).

Call it with URLs

curl -X POST "$WRL_HOOK_URL" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://example.com/pricing", "/terms"]}'

The body can be {"urls": [...]}, {"urlList": [...]} (the field name IndexNow uses), or plain text with one URL per line. Paths are read relative to your site. A call can name up to 100 URLs, all on the site's host. WRL reads a plain-text body as a list of URLs only when every line starts with /, http:// or https://. Any other text, such as status: done, names no pages and asks for a check. An empty list, {"urls": []}, starts nothing.

{
  "site": "example.com",
  "mode": "urls",
  "accepted": 1,
  "captures": [{ "url": "https://example.com/pricing", "id": "cap_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" }],
  "skipped": [{ "url": "https://example.com/terms", "reason": "captured less than 2 minutes ago" }],
  "rejected": [],
  "leftOut": []
}
  • skipped: a capture of the page is pending or was made in the last 2 minutes.
  • rejected: not on the site, not an http or https URL, or refused by the checks every capture goes through.
  • leftOut: a quota is used up or your account can't capture. reason says which: the month's captures or the storage are used up, or the account is blocked for non-payment or set for deletion.

Pages named in a hook call wait hookDelaySeconds (60 by default) before WRL captures them, because a deploy notification often arrives while the CDN still serves the old page. Captures through POST /v1/sites/{host}/check start right away.

Answers

Status Meaning
202 Captures started, or a check asked for
400 More than 100 URLs
404 Unknown hook: it was never created, or it was replaced or removed
405 A GET. Link previews and crawlers that open the URL start nothing
413 The body is larger than 256 KB
429 More than 60 calls in an hour for this site

Cost and pace

Every capture counts against your quota like a capture made by hand; a check itself costs nothing. On the free tier, a check or call that finds more pages than the month's quota covers captures what fits and lists the rest in leftOut. Captures that a site starts are queued at your account's capture rate (10 a minute by default), so 300 pages take about half an hour.

If the URL leaks

Someone who has the hook URL can start captures of pages on your site, on your account, within the limits above. They can't capture other sites or read anything. Replace the URL with POST /v1/sites/{host}/hook and update your platform.

From an API key or an agent

POST /v1/sites/{host}/check takes the same bodies as the hook, with an API key with the capture scope. Without URLs it also takes maxCaptures (1 to 1,000), the most pages the next check captures; the answer repeats it. The hook ignores maxCaptures, so a leaked hook URL can't raise what a check costs. The MCP tool check_site does the same for AI agents, without maxCaptures; see MCP.