Skip to content

Trust registry API

MethodPathAuthPurpose
GET/trust-registryTokenThe caller's domain-to-tier rules.
PUT/trust-registry/:domainTokenUpsert a trust rule. The domain is lowercased.
DELETE/trust-registry/:domainTokenDelete a trust rule.

Trust rules are per account and apply to every watch you own. They are layered over Watcher’s built-in registry, and the most specific matching rule wins.

Terminal window
curl -s https://<your-host>/trust-registry -H "authorization: Bearer $TOKEN"
{ "registry": { "example.gov": "official", "rumour-site.test": "low" } }

This returns only your rules, not the built-in ones they layer over.

Terminal window
curl -s -X PUT https://<your-host>/trust-registry/example.gov \
-H "authorization: Bearer $TOKEN" \
-H 'content-type: application/json' \
-d '{"tier":"official"}'

Valid tiers: official, trusted, unknown, low. Domains are lowercased, and a rule matches the domain and its subdomains.

Terminal window
curl -s -X DELETE https://<your-host>/trust-registry/example.gov \
-H "authorization: Bearer $TOKEN"
{ "deleted": true }
Tier Use for
official The authority itself — the issuing body, the project’s own site
trusted A secondary source you rely on: a reputable outlet that reports quickly
unknown Explicitly ungraded. Same effect as no rule, but documents the decision
low A site that keeps generating noise. It can never lift an alert above weak