Skip to content

Docs.

Everything you need to integrate Hindsite Legal — the watchlist DSL, the REST endpoints, and the webhook payload shape.

Watchlist DSL

A watchlist is a JSON document. The shape:

{
  "name": "NHS workforce bills",
  "query": {
    "kinds": ["bill", "amendment", "commencement"],
    "match": {
      "any_text": ["NHS", "workforce"],
      "all_text": [],
      "houses": ["Commons", "Lords"],
      "stages": ["Committee stage"],
      "act_citations": []
    },
    "since_days": 30
  },
  "is_active": true
}
  • kinds — which corpora to scan. Any subset of bill, amendment, commencement.
  • any_text — case-insensitive substring match; a candidate row qualifies if it matches any term.
  • all_text — same shape but all terms must match (AND of substrings).
  • houses — bills + amendments only. Defaults to both Commons and Lords when empty.
  • stages — bills only. Filter to specific stages (e.g. Committee stage).
  • act_citations — commencements only. Filter to specific enabling Acts by citation (e.g. c. 50).
  • since_days — how far back to scan on each cycle.

REST endpoints

Authenticate with a Bearer token (Supabase access token or API token) or the session cookie. Base URL https://api.hindsite.space.

  • GET /api/law/watchlists — list yours
  • POST /api/law/watchlists — create
  • PATCH /api/law/watchlists/{id} — rename, edit query, toggle active
  • DELETE /api/law/watchlists/{id} — delete (cascades to matches)
  • GET /api/law/watchlists/{id}/matches?unread_only=true&limit=50 — list matches
  • POST /api/law/watchlists/{id}/matches/{match_id}/seen — mark a match read
  • POST /api/law/watchlists/{id}/evaluate — re-evaluate now (60-second debounce)

Public read endpoints (no auth required):

  • GET /api/law/bills
  • GET /api/law/amendments
  • GET /api/law/commencements

Webhook delivery (Pro)

When a watchlist has a webhook_url set, new matches arrive as a signed POST. Payload:

POST <your-url>
Content-Type: application/json
X-Hindsite-Signature: sha256=<HMAC of body using your secret>

{
  "watchlist_id": 123,
  "matched_at": "2026-06-16T09:14:00Z",
  "kind": "amendment",
  "target_id": 47215,
  "title": "Online Safety Act 2023 — amendment 42",
  "url_path": "/api/law/amendments/47215",
  "metadata": {
    "bill_short_title": "Online Safety Act",
    "tabled_by": "Lord Clement-Jones",
    "clause_path": "/part/3/section/12/subsection/2"
  }
}

Webhook retries on 5xx with exponential backoff (1s, 5s, 30s, 5m). Receivers should respond 2xx within 5 seconds.

Rate limits

  • Reader: not metered (fair-use)
  • Pro: 1k API requests / day
  • Team: 10k API requests / day, pooled across the workspace
  • Enterprise: contracted

Questions? Email desk@hindsite.space or open the dashboard to start.