{
  "name": "Aletheca API",
  "version": "v1",
  "documentation": "https://aletheca.com/developers",
  "description": "Freedom of Information Act requests, their dispositions, and the documents they return. Reads are open; hosted writes require a Thaumatica member session.",
  "license": "https://creativecommons.org/publicdomain/zero/1.0/",
  "resources": [
    {
      "method": "POST",
      "path": "/api/v1/partner/statements",
      "summary": "Send an accounting:read Bearer key and a JSON object. Default: complete accrued_cents and up to 50 newest entries; follow next_before_sequence as before_sequence. Separate pages do not share a snapshot. Use format: snapshot for complete history, or format: period with exact UTC starts_at/ends_at for an inclusive-start/exclusive-end recording-time interval and opening/net/closing accrued balances. Downloads share one database snapshot and a SHA-256 header; each is capped at 10000 entries and 3 MiB, with 413 and no partial data on overflow. Periods are captures, not locked closes or payout receipts. Use format: approved to browse the latest 50 operator-approved statements (including superseded revisions), add capture_id for revision/head and ledger-change metadata, or also download: true for the original retained bytes and checksum. Drafts and operator audit fields stay private; exact approved IDs remain readable outside that bounded list. Opt in with history: true for 50-row history pages; follow next_before_capture_id as before_capture_id until null. Approved UUID anchors preserve the exact SQL timestamp/UUID ordering without relying on rounded public times. Pages are fresh reads, not a frozen export.",
      "auth": "partner",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/partner/deliveries",
      "summary": "Inspect delivery status for endpoint_id and external_ref using a requests:read Bearer key. Optional after_sequence is a nonnegative bigint string; pages contain up to 50 entries with a next sequence cursor.",
      "auth": "partner",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/partner/handoffs",
      "summary": "Create a signed hosted handoff for one external_ref. Send a handoffs:create key in Authorization: Bearer and external_ref plus optional expires_in_seconds (60–3600, default 900) in JSON. The token expires with its key and is invalidated by key revocation.",
      "auth": "partner",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/partner/requests",
      "summary": "Resolve the authenticated partner’s exact reference to public request projections. Send the credential in Authorization: Bearer; read keys require external_ref in the JSON body.",
      "auth": "partner",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/requests",
      "summary": "Every filed request, filtered.",
      "auth": "none",
      "params": [
        "agency",
        "disposition",
        "tag",
        "q",
        "sort",
        "limit",
        "cursor"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/requests/{id}",
      "summary": "One request with its cost, correspondence and documents.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/requests/{id}/events",
      "summary": "The full public ledger for one request.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/events",
      "summary": "The complete filtered public event collection, newest first. Offset cursors remain the default; pagination=keyset opts into a filter-bound timestamp/ID cursor. Keysets are live views with an upper fence, not retained snapshots; replay overlapping windows for backfills.",
      "auth": "none",
      "params": [
        "since",
        "category",
        "type",
        "limit",
        "cursor",
        "pagination"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/documents",
      "summary": "Released documents with pages, exemptions and OCR state.",
      "auth": "none",
      "params": [
        "q",
        "exemption",
        "agency"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/documents/{id}/file",
      "summary": "Stream an ingested public source file, with range support.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/agencies",
      "summary": "The register — 1,380 federal, state and international bodies with statute, deadline and intake routes. jurisdiction is federal|state|foreign; country filters the international layer by ISO code.",
      "auth": "none",
      "params": [
        "jurisdiction",
        "state",
        "country",
        "category",
        "parent",
        "q",
        "scorecards",
        "limit",
        "cursor"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/agencies/{slug}",
      "summary": "One body: register entry, components, and a scorecard where Aletheca has filed.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/laws",
      "summary": "All 74 statutes — 58 US public-records laws plus 16 international FOI regimes — with deadlines, appeal paths and fee-waiver standards.",
      "auth": "none",
      "params": [
        "jurisdiction",
        "q",
        "limit",
        "cursor"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/laws/{id}",
      "summary": "One statute in full, with the bodies that answer to it.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/coverage",
      "summary": "What Aletheca can file against, with the confidence of each layer.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/jurisdictions",
      "summary": "Local governments — 52,105 counties, municipalities, townships and school districts, named from Census files.",
      "auth": "none",
      "params": [
        "state",
        "kind",
        "q",
        "limit",
        "cursor"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/jurisdictions/{state}/{geoid}",
      "summary": "One local government: classification, governing statute, and the offices that hold records.",
      "auth": "none",
      "params": []
    },
    {
      "method": "GET",
      "path": "/api/v1/docket",
      "summary": "Open proposals with votes, funding and quorum.",
      "auth": "none",
      "params": [
        "status",
        "campaign",
        "sort"
      ]
    },
    {
      "method": "GET",
      "path": "/api/v1/dispositions",
      "summary": "The controlled vocabulary, with tones and clock semantics.",
      "auth": "none",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/proposals",
      "summary": "Save one or more tailored proposals to the Docket.",
      "auth": "user",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/requests",
      "summary": "Save one or more tailored commissions for review; no charge or dispatch occurs here.",
      "auth": "user",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/requests/{id}/checkout",
      "summary": "Open Stripe Checkout for an owned, reviewed commission quote.",
      "auth": "user",
      "params": []
    },
    {
      "method": "POST",
      "path": "/api/v1/checkouts/funding",
      "summary": "Open Stripe Checkout for a proposal or campaign contribution.",
      "auth": "user",
      "params": []
    }
  ],
  "holdings": {
    "register_bodies": 1380,
    "international_bodies": 18,
    "local_governments": 52105,
    "statutes": 74,
    "counties_covered": 3224,
    "county_offices_reachable": 41912,
    "coverage_note": "https://aletheca.com/api/v1/coverage"
  },
  "webhook_events": [
    "commission.submitted",
    "commission.paid",
    "dispatch.queued",
    "dispatch.portal",
    "dispatch.email",
    "dispatch.fax",
    "dispatch.mail",
    "agency.acknowledged",
    "disposition.changed",
    "documents.published",
    "embargo.lifted",
    "refund.issued",
    "documents.corrected",
    "documents.metadata_corrected"
  ],
  "embed": "https://aletheca.com/embed/v1.js"
}