{"openapi":"3.1.0","info":{"title":"AI Law Tracker — Public Laws API","version":"v1","description":"Read-only, versioned JSON API over the audited AI-regulation dataset (US state + federal, EU, and global). FREE beta. Data is CC BY 4.0 — attribution required. Informational only, not legal advice.","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://ai-law-tracker.com/api/v1"}],"security":[{},{"ApiKeyAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key"},"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Record":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Stable primary key (the /v1/laws/{id} path key)."},"scope":{"type":"string","enum":["state","federal","eu","global"]},"jurisdiction":{"type":"object","properties":{"slug":{"type":"string","example":"colorado"},"name":{"type":["string","null"],"example":"Colorado"},"abbr":{"type":["string","null"],"example":"CO"}}},"identifier":{"type":["string","null"],"example":"HB 251212"},"title":{"type":["string","null"]},"record_type":{"type":["string","null"],"example":"bill"},"status":{"type":["string","null"],"description":"Rich free-text status verbatim from the source."},"in_force":{"type":["boolean","null"],"description":"Set only where the source states it explicitly; else null."},"record_date":{"type":["string","null"],"format":"date-time"},"summary":{"type":["string","null"]},"source":{"type":["string","null"],"example":"openstates.org"},"official_url":{"type":["string","null"],"description":"Primary/official (.gov) link where available."},"updated_at":{"type":["string","null"],"format":"date-time","description":"Last CHANGED — advanced only on a real content diff."},"checked_at":{"type":["string","null"],"format":"date-time","description":"Last VERIFIED — bumped every time the source was successfully re-checked, even when unchanged."},"attribution":{"type":"string","example":"Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com"}}},"Change":{"type":"object","description":"One observed change to a record (insert or update).","properties":{"event_id":{"type":"string","format":"uuid","description":"Opaque, unique per change (append-only history row id)."},"entity":{"type":"string","enum":["law_record","jurisdiction"],"description":"Which dataset changed."},"record_id":{"type":["string","null"],"format":"uuid","description":"The /v1/laws/{id} key (law_record only; null for jurisdiction)."},"scope":{"type":["string","null"],"enum":["state","federal","eu","global"]},"jurisdiction":{"type":"object","properties":{"slug":{"type":"string","example":"washington"},"name":{"type":["string","null"],"example":"Washington"},"abbr":{"type":["string","null"],"example":"WA"}}},"identifier":{"type":["string","null"],"example":"HB 1170"},"title":{"type":["string","null"]},"change_kind":{"type":"string","enum":["insert","update"]},"changed_fields":{"type":["array","null"],"description":"Public field names that changed on an update (null on insert). Internal metadata churn appears as \"metadata\".","items":{"type":"string"}},"field_changes":{"type":"array","description":"Compact from→to value diff for the scalar fields that changed (empty on insert or a metadata-only update).","items":{"type":"object","properties":{"field":{"type":"string","example":"status"},"from":{},"to":{}}}},"observed_at":{"type":"string","format":"date-time","description":"When this state was first observed. Use as the ?since= cursor."},"source_run_id":{"type":["string","null"],"format":"uuid","description":"The scrape run that produced this state."},"attribution":{"type":"string","example":"Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com"}}},"NewsItem":{"type":"object","description":"One AI-law news headline. COPYRIGHT: only the headline, a short excerpt, the publisher name and the source URL are served — never full article text.","properties":{"id":{"type":"string","format":"uuid"},"scope":{"type":"string","enum":["state","federal","eu","global"]},"jurisdiction":{"type":"object","properties":{"slug":{"type":"string","example":"california"},"name":{"type":["string","null"],"example":"California"}}},"title":{"type":["string","null"],"description":"The headline."},"published_date":{"type":["string","null"],"format":"date"},"source":{"type":["string","null"],"example":"Reuters","description":"The publisher name."},"url":{"type":["string","null"],"description":"The publisher's article URL (the source link)."},"excerpt":{"type":["string","null"],"description":"Short summary — Developer+ only (withheld on the free/anon taste; NEVER full article text)."},"fetched_at":{"type":["string","null"],"format":"date-time","description":"Freshness stamp — Developer+ only."},"gated":{"type":"boolean","description":"Present (true) on the free/anon taste envelope — the excerpt is withheld behind a Developer key."},"attribution":{"type":"string","example":"Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com"}}},"EnforcementItem":{"type":"object","description":"One AI enforcement action or litigation matter, over news_articles (change_type enforcement|litigation). Only status approved/published rows are ever returned — every draft an automated watch writes starts pending and stays invisible here until reviewed, so an empty data[] is expected while a run awaits approval. Enterprise-tier only — every other tier gets 403 tier_upgrade_required before this schema is reached.","properties":{"id":{"type":"string","format":"uuid"},"change_type":{"type":"string","enum":["enforcement","litigation"],"description":"'enforcement' = an agency action; 'litigation' = a civil docket."},"title":{"type":["string","null"]},"agency":{"type":["string","null"],"description":"WHO acted — the regulator/AG (null on a private litigation matter with no agency)."},"scope":{"type":"string","enum":["state","federal","eu","global"]},"jurisdiction":{"type":"object","properties":{"slug":{"type":["string","null"]},"name":{"type":["string","null"]}}},"date":{"type":["string","null"],"format":"date-time","description":"published_at, else approved_at, else the draft's created_at."},"source_url":{"type":["string","null"],"description":"The official source: the agency's release, or the court docket."},"respondent":{"type":["string","null"],"description":"AGAINST WHOM the action/suit is brought."},"allegation":{"type":["string","null"],"description":"WHAT was alleged."},"outcome":{"type":["string","null"],"description":"HOW it ended (e.g. settlement, suit filed, pending)."},"penalty":{"type":["string","null"],"description":"WHAT it cost, verbatim from the source."},"statutory_basis":{"type":["string","null"],"description":"UNDER WHICH LAW, verbatim from the source."},"forum":{"type":["string","null"],"description":"The court, for a litigation row (null on enforcement)."},"summary":{"type":["string","null"]},"gated":{"type":"boolean","description":"Reserved — always absent for the Enterprise-only 200 response (no teaser tier reaches this schema)."},"attribution":{"type":"string","example":"Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com"}}},"Webhook":{"type":"object","description":"A change-notification subscription.","properties":{"id":{"type":"string","format":"uuid"},"target_url":{"type":"string","description":"HTTPS endpoint that receives signed POSTs."},"events":{"type":"array","items":{"type":"string","enum":["law.created","law.updated"]}},"scope":{"type":["string","null"],"enum":["state","federal","eu","global"],"description":"Optional filter — only changes in this scope."},"jurisdiction":{"type":["string","null"],"description":"Optional filter — only changes for this jurisdiction slug."},"active":{"type":"boolean"},"failure_count":{"type":"integer","description":"Consecutive failed deliveries; the webhook auto-disables at 10."},"disabled_at":{"type":["string","null"],"format":"date-time"},"disabled_reason":{"type":["string","null"]},"last_delivery_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"WebhookPayload":{"type":"object","description":"The signed POST body a subscriber receives for one change.","properties":{"event":{"type":"string","enum":["law.created","law.updated"]},"event_id":{"type":"string","format":"uuid","description":"Unique per change (append-only history row id)."},"delivery_id":{"type":"string","format":"uuid","description":"Unique per delivery attempt — idempotency key for the receiver."},"webhook_id":{"type":"string","format":"uuid"},"change_kind":{"type":"string","enum":["insert","update"]},"changed_fields":{"type":["array","null"],"items":{"type":"string"},"description":"Fields that changed on an update (null on insert)."},"observed_at":{"type":"string","format":"date-time"},"record":{"$ref":"#/components/schemas/Record"},"attribution":{"type":"string","example":"Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com"}}},"Obligation":{"type":"object","description":"A derived AI-law obligation — who must do what, by when, or owe what penalty. Retrieved from curated primary sources (no LLM); NOT legal advice.","properties":{"law":{"type":"string","example":"HB 3773 — AI in Employment (amends the IL Human Rights Act)"},"jurisdiction":{"type":"string","example":"Illinois"},"layer":{"type":"string","enum":["state","federal","landscape","country"],"description":"“landscape” = a notable law that may not apply to you (out-of-state); see may_not_apply."},"applies_because":{"type":["string","null"],"description":"Why this obligation was surfaced for the given context."},"obligation":{"type":["string","null"],"description":"The plain-English duty (\"what must I do\")."},"deadline":{"type":["string","null"],"description":"Free-text effective/compliance date verbatim from the source (\"by when\")."},"penalty":{"type":["string","null"]},"status":{"type":["string","null"]},"citation":{"type":["string","null"],"example":"42 U.S.C. § 2000e"},"government_body":{"type":["string","null"],"example":"EEOC"},"may_not_apply":{"type":"boolean","description":"true when the law binds another jurisdiction and may not apply to the caller."},"source_url":{"type":["string","null"],"description":"Primary/official source for this obligation."},"source_tier":{"type":"string","enum":["primary","secondary","unverified"],"description":"Grounding tier of source_url."}}},"Penalty":{"type":"object","description":"A penalty / enforcement record for one applicable law.","properties":{"law":{"type":"string"},"jurisdiction":{"type":"string"},"layer":{"type":"string","enum":["state","federal","landscape","country"]},"penalty":{"type":["string","null"]},"citation":{"type":["string","null"]},"government_body":{"type":["string","null"]},"status":{"type":["string","null"]},"may_not_apply":{"type":"boolean"},"source_url":{"type":["string","null"]},"source_tier":{"type":"string","enum":["primary","secondary","unverified"]}}},"Risk":{"type":"object","description":"Deterministic 1–10 risk score (same inputs → same score; no model).","properties":{"score":{"type":"integer","minimum":1,"maximum":10},"level":{"type":"string","enum":["Low","Medium","High","Critical"]},"factors":{"type":"array","items":{"type":"string"},"description":"Named contributions to the score (full result only; withheld in a preview)."}}},"Assessment":{"type":"object","description":"A company-profile applicability + risk assessment.","properties":{"risk":{"$ref":"#/components/schemas/Risk"},"applicable_law_count":{"type":"integer"},"jurisdictions":{"type":"array","items":{"type":"string"}},"obligations":{"type":"array","items":{"$ref":"#/components/schemas/Obligation"}},"no_law":{"type":"array","items":{"type":"object","properties":{"jurisdiction":{"type":"string"},"note":{"type":"string"},"layer":{"type":"string"}}}},"unmapped_sectors":{"type":"array","items":{"type":"string"}}}},"Error":{"type":"object","properties":{"api_version":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string","example":"rate_limited"},"message":{"type":"string"},"docs":{"type":"string"},"retry_after":{"type":"integer","description":"Seconds (429 only)."}},"required":["code","message"]}}}}},"paths":{"/health":{"get":{"summary":"Liveness + backend status","responses":{"200":{"description":"OK"}},"operationId":"getHealth"}},"/accuracy":{"get":{"summary":"Public accuracy ledger — source-health summary + change-observation stats","description":"The machine-readable form of the public /accuracy page. Returns the latest source-liveness sweep summary (how many cited sources were checked, verified live, confirmed broken, or unverified), the count of confirmed-broken sources in the review queue, and the total append-only change-observations on record. Free/public: no tier gate, rate-limited like any endpoint. Every figure is a live count over real rows.","responses":{"200":{"description":"Accuracy summary.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"source_health":{"type":"object","properties":{"checked":{"type":"integer"},"live":{"type":"integer"},"confirmed_broken":{"type":"integer"},"unverified":{"type":"integer"},"live_pct":{"type":["integer","null"]},"last_checked_at":{"type":["string","null"],"format":"date-time"}}},"observations":{"type":"object","properties":{"total":{"type":"integer"},"since":{"type":["string","null"],"format":"date-time"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getAccuracy"}},"/laws":{"get":{"summary":"List legal records (filter, sort, paginate)","description":"TIER-GATING: filters and sorting (scope, jurisdiction, status, in_force, updated_since, sort, order) are honoured at EVERY tier including anonymous — they are documented query semantics, so they are never silently dropped. What Free/anonymous callers get instead is low volume and shallow pagination: anon 5 rows per page with a trimmed field envelope, free-key 25 rows with the full field set. Developer+ raises the page size and unlocks deep pagination, the change feed and per-record history. When a request is capped, the response echoes meta.gated + an upgrade hint (it is never a hard error).","parameters":[{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug (e.g. colorado, eu, us-federal, canada)."},{"name":"status","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on status."},{"name":"in_force","in":"query","schema":{"type":"boolean"},"description":"Filter by the in_force flag."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records updated at/after this ISO timestamp."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Substring search over title + summary."},{"name":"sort","in":"query","schema":{"type":"string","enum":["updated_at","record_date","title"],"default":"updated_at"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"A page of records.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Record"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"}}}}}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listLaws"}},"/laws/{id}":{"get":{"summary":"Get one record by uuid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Record"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getLaw"}},"/laws/{id}/history":{"get":{"summary":"Full change timeline for one record","description":"Every snapshot of the record (ascending observed_at), each with change_kind, changed_fields and the record values as of that snapshot. TIER-GATING: Developer+ only — anonymous/Free callers get 403 tier_upgrade_required. Lookback window climbs by tier: Developer 30 days, Pro 365 days, Business/Enterprise full history.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record timeline.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"object","properties":{"record_id":{"type":"string","format":"uuid"},"count":{"type":"integer"},"timeline":{"type":"array","items":{"type":"object","properties":{"observed_at":{"type":"string","format":"date-time"},"change_kind":{"type":"string","enum":["insert","update"]},"changed_fields":{"type":["array","null"],"items":{"type":"string"}},"source_run_id":{"type":["string","null"],"format":"uuid"},"record":{"$ref":"#/components/schemas/Record"}}}}}}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getLawHistory"}},"/changes":{"get":{"summary":"Unified changelog (poll for what changed since X)","description":"Time-ordered feed of every observed insert/update across the dataset, unioned from the append-only history of legal records and jurisdiction summaries. Poll with ?since=<meta.cursor>. TIER-GATING: Developer+ only — anonymous/Free callers get 403 tier_upgrade_required (the change feed is the paid differentiator). The lookback window is clamped per tier (Developer 30-day, Pro 90-day, Business/Enterprise full) — see meta.window.","parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only changes observed after this ISO timestamp (pass the previous response meta.cursor to poll)."},{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug."},{"name":"entity","in":"query","schema":{"type":"string","enum":["law_record","jurisdiction"]},"description":"Restrict to one dataset (default: both)."},{"name":"significant","in":"query","schema":{"type":"boolean","default":false},"description":"Drop internal metadata-only updates (keeps inserts + real field changes)."},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"},"description":"Order by observed_at."},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"A page of changes.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Change"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"order":{"type":"string","enum":["asc","desc"]},"cursor":{"type":["string","null"],"format":"date-time","description":"Newest observed_at on this page; pass as ?since= to poll."},"window":{"type":"object","properties":{"tier":{"type":"string"},"lookback_days":{"type":["integer","null"],"description":"null = unbounded (paid tiers)."},"clamped":{"type":"boolean","description":"true when the requested since was older than the tier window."}}}}}}}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listChanges"}},"/feed":{"get":{"summary":"Lean stream of recent significant changes","description":"Convenience view over /changes with significant=true and no value diffs — the newest meaningful changes, human-scannable. TIER-GATING: same as /changes — Developer+ only (403 tier_upgrade_required for anonymous/Free).","parameters":[{"name":"since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only changes observed after this ISO timestamp (pass the previous response meta.cursor to poll)."},{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug."},{"name":"entity","in":"query","schema":{"type":"string","enum":["law_record","jurisdiction"]},"description":"Restrict to one dataset (default: both)."},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":100}}],"responses":{"200":{"description":"Recent significant changes."},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getFeed"}},"/jurisdictions":{"get":{"summary":"List covered jurisdictions with record counts","parameters":[{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]}}],"responses":{"200":{"description":"Jurisdiction index"}},"operationId":"listJurisdictions"}},"/search":{"get":{"summary":"Search records by title/summary text","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug (e.g. colorado, eu, us-federal, canada)."},{"name":"status","in":"query","schema":{"type":"string"},"description":"Case-insensitive substring match on status."},{"name":"in_force","in":"query","schema":{"type":"boolean"},"description":"Filter by the in_force flag."},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records updated at/after this ISO timestamp."},{"name":"sort","in":"query","schema":{"type":"string","enum":["updated_at","record_date","title"],"default":"updated_at"}},{"name":"order","in":"query","schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"Ranked results"},"400":{"description":"Missing q","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"searchLaws"}},"/news":{"get":{"summary":"AI-law news headlines (filter, keyword, date range; newest-first)","description":"The audited AI-regulation news feed (headline + short excerpt + publisher + source URL — never full article text). Free/anon get a TASTE: fewer results, shallow pagination, only the newest headlines (a recency window) and the excerpt withheld. Developer+ gets the full archive, high volume and the excerpt. meta.window shows the tier recency floor; meta.gated + meta.upgrade show what was limited.","parameters":[{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug (e.g. california, federal, eu, global)."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Keyword substring search over the headline + excerpt."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"Only headlines published on/after this date (YYYY-MM-DD). Free/anon are clamped to their recency window (see meta.window)."},{"name":"since","in":"query","schema":{"type":"string","format":"date"},"description":"Alias for `from` — poll for headlines since a date."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Only headlines published on/before this date (YYYY-MM-DD)."},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100},"description":"Free/anon are capped lower (a taste)."},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"A page of news headlines.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/NewsItem"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"tier":{"type":"string"},"window":{"type":"object","description":"The recency gate applied to this response.","properties":{"tier":{"type":"string"},"recency_days":{"type":["integer","null"],"description":"null = full archive (Developer+)."},"floor":{"type":["string","null"],"format":"date","description":"Earliest published_date returned."},"clamped":{"type":"boolean","description":"true when the request reached older than the tier window."}}},"gated":{"type":"array","items":{"type":"string"},"description":"What was limited for this tier (e.g. excerpt, recency, limit)."},"upgrade":{"type":"string"}}}}}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listNews"}},"/enforcement":{"get":{"summary":"AI enforcement actions + litigation (agency actions and civil dockets; newest-first) — Enterprise only","description":"AI-related regulatory enforcement (FTC/DOJ/SEC/state AG actions, etc.) and civil litigation (federal court dockets), over the same six AET fields — agency, respondent, allegation, outcome, penalty, statutory basis — plus forum for litigation rows. `change_type` tells the two lanes apart. ONLY status approved/published rows are ever returned: every draft the automated watch crons write starts pending and is invisible here until reviewed, so an empty data[] with meta.total: 0 is the expected response while a batch awaits approval — not an error. TIER-GATING: Enterprise-only. Anonymous, Free, and every self-serve paid tier (Developer $29 / Pro $99 / Business $299) get a hard 403 tier_upgrade_required — there is no teaser and no partial access below Enterprise. Same hard-gate pattern as /v1/changes, /v1/feed, and /v1/webhooks.","parameters":[{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug."},{"name":"q","in":"query","schema":{"type":"string"},"description":"Keyword substring search over title + summary."},{"name":"agency","in":"query","schema":{"type":"string"},"description":"Substring match on the acting agency/regulator (e.g. FTC, DOJ, California Attorney General)."},{"name":"change_type","in":"query","schema":{"type":"string","enum":["enforcement","litigation"]},"description":"Restrict to one lane: enforcement (agency actions) or litigation (civil dockets). Default: both."},{"name":"date_from","in":"query","schema":{"type":"string","format":"date"},"description":"Only items recorded on/after this date (YYYY-MM-DD)."},{"name":"date_to","in":"query","schema":{"type":"string","format":"date"},"description":"Only items recorded on/before this date (YYYY-MM-DD)."},{"name":"limit","in":"query","schema":{"type":"integer","default":20,"maximum":100}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"A page of enforcement/litigation items (Enterprise callers only).","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EnforcementItem"}},"meta":{"type":"object","properties":{"total":{"type":"integer"},"count":{"type":"integer"},"limit":{"type":"integer"},"offset":{"type":"integer"},"tier":{"type":"string"},"gated":{"type":"array","items":{"type":"string"},"description":"What was limited for this tier (e.g. limit, offset)."},"upgrade":{"type":"string"}}}}}}}},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Below Enterprise tier — tier_upgrade_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listEnforcement"}},"/countries":{"get":{"summary":"National (global-scope) jurisdictions with record counts","responses":{"200":{"description":"Country index"},"503":{"description":"Backend unavailable"}},"operationId":"listCountries"}},"/states":{"get":{"summary":"US state jurisdictions with record counts","responses":{"200":{"description":"State index"},"503":{"description":"Backend unavailable"}},"operationId":"listStates"}},"/categories":{"get":{"summary":"Dataset facets: record_type + scope distributions","responses":{"200":{"description":"Category facets ({ record_types[], scopes[] } of { value, count })."},"503":{"description":"Backend unavailable"}},"operationId":"listCategories"}},"/sectors":{"get":{"summary":"Sector index (valid slugs for /obligations, /penalties, /assess)","responses":{"200":{"description":"List of { slug, name, risk, description, has_federal_framework }."}},"operationId":"listSectors"}},"/sectors/{sector}":{"get":{"summary":"One sector: overview + derived obligations & penalties","description":"The free awareness OVERVIEW of a sector (name, risk, enforcement bodies, federal penalty structure) plus the DERIVED per-law obligations & penalties. The overview is open to every tier; the derived obligations/penalties are the interpreted layer — full for Pro+, a one-item preview (meta.preview=true) + upsell below. NOT legal advice.","parameters":[{"name":"sector","in":"path","required":true,"schema":{"type":"string"},"description":"A sector slug (see /sectors)."}],"responses":{"200":{"description":"The sector cross-section."},"404":{"description":"Unknown sector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getSector"}},"/deadlines":{"get":{"summary":"Upcoming AI-law effective / compliance dates (JSON or iCal)","description":"A forward-looking compliance calendar derived deterministically from the curated corpus — each entry carries the VERBATIM source deadline text + primary-source URL (no fabricated dates; a jurisdiction whose deadline text has no explicit date is only counted in meta.undated). Free for every tier. Pass ?format=ical (alias ics) for an RFC 5545 .ics you can subscribe to (webcal). The interpreted \"what must I do about each deadline\" layer is on /obligations + /assess.","parameters":[{"name":"scope","in":"query","schema":{"type":"string","enum":["state","federal","eu","global"]},"description":"Filter by scope."},{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"Exact jurisdiction slug (e.g. california, eu-germany)."},{"name":"upcoming","in":"query","schema":{"type":"boolean","default":true},"description":"Only future dates (default). Set false (or all=true) to include past effective dates."},{"name":"format","in":"query","schema":{"type":"string","enum":["json","ical","ics"],"default":"json"},"description":"ical/ics returns a text/calendar .ics feed."}],"responses":{"200":{"description":"A page of deadlines (application/json) or an .ics feed (text/calendar)."},"400":{"description":"Invalid parameter","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listDeadlines"}},"/bills":{"get":{"summary":"Curated landmark-bill index","description":"The named, name-searchable AI laws (valid slugs for /bills/{slug}), from the primary-sourced landmark registry. Free.","responses":{"200":{"description":"List of { slug, bill_number, title, jurisdiction, status, deadline, official_url, verified_on }."}},"operationId":"listBills"}},"/bills/{slug}":{"get":{"summary":"One landmark bill: sources, citations, cross-links","description":"One curated bill — core fields, tiered source URLs, citations (identifier + audited alternate names), and cross-links. Where a matching legal_records row exists, the response binds the live change timeline (links.history → /laws/{id}/history). Primary-sourced; the DB binding is best-effort (a miss omits the link, never fabricates it).","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"},"description":"A bill slug (see /bills)."}],"responses":{"200":{"description":"The bill detail."},"404":{"description":"Unknown bill","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getBill"}},"/laws/{id}/sources":{"get":{"summary":"Source URLs backing one record (tiered primary/secondary)","description":"A record's own official/.gov link plus the curated jurisdiction sources, each tiered primary/secondary. Basic tiers (anon/Free) get primary sources only; Developer+ get the full set incl. secondary/analysis links. Only real held URLs — never fabricated.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record sources."},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listLawSources"}},"/laws/{id}/citations":{"get":{"summary":"Citation projection for one record","description":"A record's identifier, title, audited alternate names, and a formatting-convenience suggested citation over public metadata (labelled — never an official cite). Free at every tier.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The record citations."},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Backend unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listLawCitations"}},"/auth/token":{"post":{"summary":"Self-serve: issue a FREE API token by email","description":"A conventional token endpoint over the same key store as POST /keys. Submit an email; get a free-tier token, emailed once (durable copy) and returned once here. Only ever mints a FREE token (no privilege escalation); the owner/HMAC secret is never exposed. Paid tiers are granted via Polar checkout (POST /checkout). Throttled per IP; one active token per email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}},"responses":{"201":{"description":"Token issued (shown once)."},"400":{"description":"Invalid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A token already exists for this email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createAuthToken"}},"/obligations":{"get":{"summary":"Derived AI-law obligations for a jurisdiction / sector / use","description":"The interpreted \"what must I do\" layer — who must do what, by when, or owe what penalty — for the given context. Every obligation is grounded in a real law record + its primary source (no LLM). Provide at least a jurisdiction or a sector. NOT legal advice. Paid feature (Pro+); lower tiers receive a one-item preview (meta.preview=true) with an upgrade hint.","parameters":[{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"A US state slug (e.g. california) OR a covered country slug (e.g. canada, eu-germany). See /jurisdictions."},{"name":"sector","in":"query","schema":{"type":"string"},"description":"A sector slug (see /sectors), e.g. healthcare, finance, hr-recruiting."},{"name":"use","in":"query","schema":{"type":"string"},"description":"Comma-separated AI uses: hiring, customer, content, analytics, product, other."},{"name":"decision_impact","in":"query","schema":{"type":"string","enum":["hiring_firing","credit_insurance","healthcare","housing","internal_only","not_sure"]},"description":"What the AI decides about people (escalates applicability)."}],"responses":{"200":{"description":"The derived obligations for the context.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Obligation"}},"meta":{"type":"object","properties":{"tier":{"type":"string"},"total":{"type":"integer"},"count":{"type":"integer"},"no_law":{"type":"array","items":{"type":"object"},"description":"Jurisdictions with no applicable statute (an honest fact, not an obligation)."},"preview":{"type":"boolean","description":"true when the result was capped for an under-tier caller."},"required_tier":{"type":["string","null"]},"upgrade":{"type":["string","null"]},"disclaimer":{"type":"string"},"attribution":{"type":"string"}}}}}}}},"400":{"description":"Missing/invalid jurisdiction or sector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listObligations"}},"/penalties":{"get":{"summary":"Penalty & enforcement dataset for the applicable laws","description":"Per applicable law: the monetary/other penalty, enforcing body, citation, and primary source, plus a sector-level penalty-structure summary (full result only). Provide at least a jurisdiction or a sector. Paid feature (Developer+); lower tiers receive a one-item preview.","parameters":[{"name":"jurisdiction","in":"query","schema":{"type":"string"},"description":"A US state slug (e.g. california) OR a covered country slug (e.g. canada, eu-germany). See /jurisdictions."},{"name":"sector","in":"query","schema":{"type":"string"},"description":"A sector slug (see /sectors), e.g. healthcare, finance, hr-recruiting."}],"responses":{"200":{"description":"Penalties for the context.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Penalty"}},"meta":{"type":"object","properties":{"tier":{"type":"string"},"total":{"type":"integer"},"count":{"type":"integer"},"sector_summary":{"type":["object","null"],"properties":{"sector":{"type":"string"},"penalty_structure":{"type":["string","null"]},"enforcement_bodies":{"type":"array","items":{"type":"string"}}}},"preview":{"type":"boolean"},"required_tier":{"type":["string","null"]},"upgrade":{"type":["string","null"]},"disclaimer":{"type":"string"},"attribution":{"type":"string"}}}}}}}},"400":{"description":"Missing/invalid jurisdiction or sector","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listPenalties"}},"/assess":{"post":{"summary":"Company profile → applicable obligations + 1–10 risk score","description":"The compliance-report engine (deterministic, no LLM — cannot hallucinate) as an API. POST a business profile; get the applicable AI-law obligations plus a reproducible 1–10 risk score with a named factor breakdown. state + sector are required. Paid feature (Pro+); lower tiers receive a preview (risk band + counts + one sample obligation; factor breakdown withheld).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["state","sector"],"properties":{"state":{"type":"string","description":"US state slug (e.g. california)."},"sector":{"type":"string","description":"Sector slug (see /sectors)."},"aiUse":{"type":"array","items":{"type":"string","enum":["hiring","customer","content","analytics","product","other"]}},"ai_decision_impact":{"type":"string","enum":["hiring_firing","credit_insurance","healthcare","housing","internal_only","not_sure"]},"countries":{"type":"array","items":{"type":"string"},"description":"EU/global country slugs also operated in/served."},"bias_audit":{"type":"string","enum":["recent","old","never","unknown"]},"ai_policy":{"type":"string","enum":["formal","informal","none","developing"]},"ai_source":{"type":"string","enum":["custom","third_party","embedded","combination","not_sure"]},"size":{"type":"string"}}}}}},"responses":{"200":{"description":"The assessment.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Assessment"}}}}}},"400":{"description":"Missing state/sector or malformed body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createAssessment"}},"/report":{"post":{"summary":"On-demand AI compliance report (PDF or signed link) — the $79 report engine as an API","description":"Generate the personalized, source-grounded AI-law compliance report for a business profile — the SAME deterministic engine behind the $79 /compliance-report product (no LLM in the grounded path — it cannot invent a statute, deadline, or penalty). POST state + sector (+ optional AI-use profile). Default response is JSON: the risk assessment (1–10 score + obligations) plus a signed `report.download_url` for the rendered PDF. Pass `format:\"pdf\"` (or send `Accept: application/pdf`) to stream the PDF binary inline instead. Paid feature (Pro+) with a monthly report quota per tier (Pro 5/mo, Business 25/mo); when the quota is exhausted the endpoint returns 402 with an upgrade / single-report hint. Lower tiers receive a preview (risk band + counts + one sample obligation) with the PDF/download withheld behind an upgrade hint. Informational only — NOT legal advice.","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["state","sector"],"properties":{"state":{"type":"string","description":"US state slug (e.g. california). `jurisdiction` is accepted as an alias."},"jurisdiction":{"type":"string","description":"Alias for `state` (US state slug)."},"sector":{"type":"string","description":"Sector slug (see /sectors)."},"aiUse":{"type":"array","items":{"type":"string","enum":["hiring","customer","content","analytics","product","other"]}},"ai_decision_impact":{"type":"string","enum":["hiring_firing","credit_insurance","healthcare","housing","internal_only","not_sure"]},"countries":{"type":"array","items":{"type":"string"},"description":"EU/global country slugs also operated in/served."},"bias_audit":{"type":"string","enum":["recent","old","never","unknown"]},"ai_policy":{"type":"string","enum":["formal","informal","none","developing"]},"ai_source":{"type":"string","enum":["custom","third_party","embedded","combination","not_sure"]},"size":{"type":"string","description":"Company size band (e.g. startup, small, medium, enterprise)."},"company":{"type":"string","description":"Company name printed on the report (optional)."},"email":{"type":"string","format":"email","description":"Delivery email printed on the report footer (optional)."},"format":{"type":"string","enum":["json","pdf"],"description":"json (default) → summary + signed download link; pdf → stream the PDF binary."}}}}}},"responses":{"200":{"description":"The report — JSON (assessment + download link) or, with format=pdf/Accept: application/pdf, the PDF binary.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"object","properties":{"risk":{"$ref":"#/components/schemas/Risk"},"applicable_law_count":{"type":"integer"},"jurisdictions":{"type":"array","items":{"type":"string"}},"obligations":{"type":"array","items":{"$ref":"#/components/schemas/Obligation"}},"report":{"type":"object","properties":{"available":{"type":"boolean"},"format":{"type":"string","example":"pdf"},"filename":{"type":"string"},"download_url":{"type":"string","format":"uri","description":"Signed private link to fetch the rendered PDF."},"expires_in_days":{"type":"integer"},"required_tier":{"type":"string","description":"On a preview, the tier that unlocks the PDF."}}}}}}}},"application/pdf":{"schema":{"type":"string","format":"binary","description":"The rendered compliance-report PDF."}}}},"400":{"description":"Missing state/sector or malformed body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createReport"}},"/keys":{"post":{"summary":"Self-serve: issue a FREE API key by email","description":"Submit an email to mint a free-tier key. The plaintext key is emailed to that address (your durable copy — find it again there anytime) AND returned once in this response. We never store the plaintext server-side. One active free key per email; abusive request rates are throttled per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"Where the key is delivered."}}}}}},"responses":{"201":{"description":"Key issued (plaintext shown once).","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"key":{"type":"string","example":"alt_free_…","description":"Plaintext key — shown once, not recoverable."},"key_prefix":{"type":"string","example":"alt_free_ab12"},"id":{"type":"string","format":"uuid"},"tier":{"type":"string","example":"free"},"email":{"type":"string"},"email_delivery":{"type":"object","properties":{"delivered":{"type":"boolean"}}}}}}}},"400":{"description":"Invalid email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A key already exists for this email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many key requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Key store not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createApiKey"}},"/me":{"get":{"summary":"Your account: tier, limits & live usage (requires an API key)","description":"Returns the presenting key's own account — tier, effective rate/quota limits, live durable usage (requests used today + this month, from the api_usage counter), remaining, reset times, and the capabilities the tier unlocks. The key IS the credential; no separate login. Powers the self-serve dashboard at /developers/dashboard. This call itself counts as one request.","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Your account snapshot.","content":{"application/json":{"schema":{"type":"object","properties":{"api_version":{"type":"string"},"data":{"type":"object","properties":{"key_prefix":{"type":"string","example":"alt_free_ab12"},"tier":{"type":"string","example":"free"},"owner":{"type":["string","null"],"description":"Your account email, masked."},"revoked":{"type":"boolean"},"created_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"limits":{"type":"object","properties":{"per_min":{"type":"integer"},"per_day":{"type":"integer"},"per_month":{"type":["integer","null"],"description":"null = unbounded (enterprise)."}}},"usage":{"type":"object","properties":{"tracking":{"type":"boolean","description":"false until the api_usage migration is applied; per-period counts are then null (not fabricated)."},"day":{"type":"object","properties":{"used":{"type":["integer","null"]},"limit":{"type":["integer","null"]},"remaining":{"type":["integer","null"]},"resets_in_seconds":{"type":"integer"}}},"month":{"type":"object","properties":{"used":{"type":["integer","null"]},"limit":{"type":["integer","null"]},"remaining":{"type":["integer","null"]},"resets_in_seconds":{"type":"integer"}}}}},"capabilities":{"type":"object","description":"What this tier unlocks (see tier-gating notes on each endpoint).","properties":{"list_max":{"type":"integer"},"full_fields":{"type":"boolean"},"advanced_filters":{"type":"boolean"},"changes_window_days":{"description":"null = feature off, \"full\", or a day count."},"history_window_days":{"description":"null = feature off, \"full\", or a day count."},"webhooks":{"description":"Allowance (integer) or \"unlimited\"."},"bulk_export":{"type":"boolean"}}}}}}}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getMe"},"delete":{"summary":"Revoke your own key (requires an API key)","description":"Self-service revoke of the presenting key. Irreversible — the key can no longer authenticate afterwards. Create a new key to keep using the API.","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"Key revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"key_prefix":{"type":"string"},"revoked":{"type":"boolean"}}}}}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteMe"}},"/webhooks":{"post":{"summary":"Subscribe to change events (Pro+ · requires an API key)","description":"Create a webhook. When a matching legal record change is observed, an HMAC-SHA256-signed POST is delivered to target_url. The signing_secret is returned ONCE in this response. Verify each delivery (see x-webhooks). TIER-GATING: Pro+ only (Free/Developer allowance = 0 → 403 tier_upgrade_required). Per-key subscription cap: Pro 3, Business 25, Enterprise unlimited.","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["target_url"],"properties":{"target_url":{"type":"string","description":"Public HTTPS endpoint."},"events":{"type":"array","items":{"type":"string","enum":["law.created","law.updated"]},"description":"Default: law.created, law.updated."},"scope":{"type":"string","enum":["state","federal","eu","global"],"description":"Optional filter."},"jurisdiction":{"type":"string","description":"Optional exact-slug filter."}}}}}},"responses":{"201":{"description":"Created (includes signing_secret, shown once).","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"description":"Invalid target_url or events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Per-key webhook limit reached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Webhooks not enabled yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"createWebhook"},"get":{"summary":"List this key's webhooks","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"responses":{"200":{"description":"The key’s subscriptions.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"description":"API key required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"listWebhooks"}},"/webhooks/{id}":{"get":{"summary":"Get one subscription","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The subscription","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Webhook"}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"getWebhook"},"delete":{"summary":"Unsubscribe","security":[{"ApiKeyAuth":[]},{"BearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted"},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"operationId":"deleteWebhook"}}},"x-news":{"description":"GET /v1/news copyright + tier gate. We serve ONLY the headline, a short excerpt, the publisher name and the source URL — never full article text. Free = a taste (newest headlines only, low volume, excerpt withheld); Developer+ = the full archive, high volume + the excerpt.","recency_window_days":{"anonymous":14,"free_key":45,"developer":null,"pro":null,"business":null},"excerpt":"Developer+ only (withheld on the free/anon taste)."},"x-webhooks":{"description":"Outbound change notifications. Subscribe with POST /v1/webhooks; deliveries are POSTed to target_url with an HMAC-SHA256 signature.","events":["law.created","law.updated"],"payload":{"$ref":"#/components/schemas/WebhookPayload"},"headers":{"X-ALT-Signature":"sha256=<hex HMAC-SHA256 of `${timestamp}.${rawBody}` under your signing_secret>","X-ALT-Timestamp":"Unix seconds; folded into the signed content (reject if skew is large).","X-ALT-Event":"law.created | law.updated","X-ALT-Delivery":"Delivery uuid — use as an idempotency key.","X-ALT-Webhook-Id":"The subscription uuid."},"delivery":"At-least-once. Up to 6 attempts with exponential backoff; 10 consecutive failures auto-disable the webhook. De-duplicate on X-ALT-Delivery / event_id.","verify_example_node":"const crypto = require('crypto');\nfunction verify(req, secret) {\n  const ts = req.headers['x-alt-timestamp'];\n  const sig = (req.headers['x-alt-signature'] || '').replace(/^sha256=/, '');\n  const expected = crypto.createHmac('sha256', secret).update(`${ts}.${req.rawBody}`).digest('hex');\n  const a = Buffer.from(sig), b = Buffer.from(expected);\n  return a.length === b.length && crypto.timingSafeEqual(a, b);\n}"},"x-rate-limits":{"description":"Best-effort per-client limits during beta. Every response carries X-RateLimit-Limit/Remaining/Reset. 429 includes Retry-After. Get a free key at https://ai-law-tracker.com/developers.","anonymous":"20 req/min, 500 req/day (per IP, no key)","free_key":"60 req/min, 2000 req/day","developer":"120 req/min, 5000 req/day","pro":"300 req/min, 50000 req/day","business":"1000 req/min, 500000 req/day","enterprise":"custom (contact sales)"},"x-pricing":{"description":"Self-serve tiers. Free is live now (self-serve at /developers); paid tiers are billed per month. See https://ai-law-tracker.com/pricing.","tiers":[{"name":"Free","price_usd_month":0,"note":"Self-serve. Attribution (dofollow) required."},{"name":"Developer","price_usd_month":29},{"name":"Pro","price_usd_month":99,"note":"Webhooks + 90-day changelog window."},{"name":"Business","price_usd_month":299,"note":"Webhooks + full changelog history."},{"name":"Enterprise","price_usd_month":null,"note":"Quote. Custom limits, SLA, OEM/resale."}]},"x-attribution":"Data by AI Law Tracker (CC BY 4.0) — https://ai-law-tracker.com"}