{
 "openapi": "3.0.3",
 "info": {
  "title": "Class Action Hero \u2014 Open Settlements API",
  "version": "2.1.0",
  "description": "Every open class-action settlement currently accepting claims in the United States, plus the closed archive, the Canadian set, story leads, CSV cuts, and a court-filings index. Data published under CC-BY 4.0 with attribution. API service limits: 25 anonymous requests/day per IP on /v1 routes; a free API key allows 1,000 requests/day. Changelog: https://classactionhero.app/api/changelog/",
  "license": {
   "name": "CC-BY 4.0",
   "url": "https://creativecommons.org/licenses/by/4.0/"
  },
  "contact": {
   "name": "Class Action Hero",
   "email": "press@classactionhero.app",
   "url": "https://classactionhero.app/api/"
  }
 },
 "servers": [
  {
   "url": "https://classactionhero.app"
  }
 ],
 "paths": {
  "/api/settlements.json": {
   "get": {
    "summary": "All open US settlements in the worker envelope. A valid API key is required on the public host; anonymous requests receive 401 with free-key signup information.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "responses": {
     "200": {
      "description": "All open US settlements in the worker envelope.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SettlementEnvelope"
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily tier limit reached.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/api/settlements.meta.json": {
   "get": {
    "summary": "Build metadata for settlements.json: generated_at, row count, schema version, aggregate fund total.",
    "responses": {
     "200": {
      "description": "Build metadata for settlements.json: generated_at, row count, schema version, aggregate fund total."
     }
    }
   }
  },
  "/api/closed-settlements.json": {
   "get": {
    "summary": "Closed US settlements (deadlines passed). Same wrapped shape as settlements.json (meta block + settlements array), with status=closed.",
    "responses": {
     "200": {
      "description": "Closed US settlements (deadlines passed). Same wrapped shape as settlements.json (meta block + settlements array), with status=closed.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "meta": {
           "type": "object"
          },
          "settlements": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Settlement"
           }
          }
         },
         "required": [
          "meta",
          "settlements"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/api/settlements-ca.json": {
   "get": {
    "summary": "Canadian settlements. Same wrapped shape as settlements.json (meta block + settlements array), currency CAD.",
    "responses": {
     "200": {
      "description": "Canadian settlements. Same wrapped shape as settlements.json (meta block + settlements array), currency CAD.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "meta": {
           "type": "object"
          },
          "settlements": {
           "type": "array",
           "items": {
            "$ref": "#/components/schemas/Settlement"
           }
          }
         },
         "required": [
          "meta",
          "settlements"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/api/story-leads.json": {
   "get": {
    "summary": "Story leads for journalists: largest funds, closing soon, no-proof-needed, rebuilt at every dataset bake.",
    "responses": {
     "200": {
      "description": "Story leads for journalists: largest funds, closing soon, no-proof-needed, rebuilt at every dataset bake."
     }
    }
   }
  },
  "/api/court-filings.json": {
   "get": {
    "summary": "Court-filings index: per-case documents with ISO filed dates, courts, case numbers, and verbatim slot quotes.",
    "responses": {
     "200": {
      "description": "Court-filings index: per-case documents with ISO filed dates, courts, case numbers, and verbatim slot quotes."
     }
    }
   }
  },
  "/api/feed.xml": {
   "get": {
    "summary": "RSS feed of open settlements by upcoming deadline.",
    "responses": {
     "200": {
      "description": "RSS feed of open settlements by upcoming deadline."
     }
    }
   }
  },
  "/api/feed-new.xml": {
   "get": {
    "summary": "RSS feed of settlements newly added to the dataset (first seen in the last 90 days).",
    "responses": {
     "200": {
      "description": "RSS feed of settlements newly added to the dataset (first seen in the last 90 days)."
     }
    }
   }
  },
  "/api/search-index.json": {
   "get": {
    "summary": "Site search index.",
    "responses": {
     "200": {
      "description": "Site search index."
     }
    }
   }
  },
  "/api/stats-snapshot.json": {
   "get": {
    "summary": "Site statistics snapshot with an as_of timestamp.",
    "responses": {
     "200": {
      "description": "Site statistics snapshot with an as_of timestamp."
     }
    }
   }
  },
  "/api/cuts/{cut}": {
   "get": {
    "summary": "CSV data cuts (all-settlements, no-proof-needed, closing-this-week, closing-this-month, largest-funds, state-{code}).",
    "parameters": [
     {
      "name": "cut",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "CSV cut",
      "content": {
       "text/csv": {}
      }
     }
    }
   }
  },
  "/v1/status": {
   "get": {
    "summary": "API worker health check.",
    "responses": {
     "200": {
      "description": "Worker health status.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "ok": {
           "type": "boolean"
          },
          "service": {
           "type": "string"
          },
          "time": {
           "type": "string",
           "format": "date-time"
          }
         },
         "required": [
          "ok",
          "service",
          "time"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/v1/tos": {
   "get": {
    "summary": "Machine-readable API terms.",
    "responses": {
     "200": {
      "description": "API terms.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "terms": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         },
         "required": [
          "terms"
         ]
        }
       }
      }
     }
    }
   }
  },
  "/v1/settlements": {
   "get": {
    "summary": "Open US settlements. Anonymous callers are limited by IP; API-key callers are limited by tier.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {},
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "responses": {
     "200": {
      "description": "Open US settlements in the worker envelope.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/SettlementEnvelope"
        }
       }
      }
     },
     "401": {
      "description": "Invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily anonymous or tier limit reached.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/free-key": {
   "post": {
    "summary": "Request a self-serve free API key.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "email": {
          "type": "string",
          "format": "email"
         },
         "accept_terms": {
          "type": "boolean"
         },
         "accepted_terms": {
          "type": "boolean"
         }
        },
        "required": [
         "email"
        ]
       }
      }
     }
    },
    "responses": {
     "201": {
      "description": "Free API key issued."
     },
     "400": {
      "description": "Invalid email or attribution terms not accepted.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "409": {
      "description": "An active API key already exists for this email.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Too many free-key requests from this IP today.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/usage": {
   "get": {
    "summary": "Today's API usage and remaining quota for the supplied key.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "responses": {
     "200": {
      "description": "Usage for the supplied API key."
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/webhooks": {
   "get": {
    "summary": "List webhook registrations for the supplied paid-tier key.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "responses": {
     "200": {
      "description": "Registered webhooks."
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Webhook alerts require a paid-tier key or higher.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "post": {
    "summary": "Register a webhook for new settlements or settlements closing within seven days.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "format": "uri"
         },
         "events": {
          "type": "array",
          "items": {
           "type": "string",
           "enum": [
            "new",
            "closing_7d"
           ]
          },
          "minItems": 1
         }
        },
        "required": [
         "url",
         "events"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Webhook registered or updated."
     },
     "400": {
      "description": "Invalid webhook URL or events.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Webhook alerts require a paid-tier key or higher.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   },
   "delete": {
    "summary": "Remove a webhook registration for the supplied paid-tier key.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "url": {
          "type": "string",
          "format": "uri"
         }
        },
        "required": [
         "url"
        ]
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Webhook removal result."
     },
     "400": {
      "description": "Webhook URL missing.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Webhook alerts require a paid-tier key or higher.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/match": {
   "post": {
    "summary": "Ranked settlement matches for a caller's signals (paid-tier key or higher). Deterministic scoring: state restriction, category topics and keywords matched against each settlement's name and eligibility text. Matches are signal-based; the eligibility text in each result governs.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "states": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Two-letter US state codes."
         },
         "categories": {
          "type": "array",
          "items": {
           "type": "string"
          },
          "description": "Topical categories (e.g. 'data breach', 'wage', 'tcpa'), matched as signals against name and eligibility text."
         },
         "keywords": {
          "type": "array",
          "items": {
           "type": "string"
          }
         },
         "limit": {
          "type": "integer",
          "description": "Max matches to return (default 10, max 50)."
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Ranked matches with a signal-based matching note.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "count": {
           "type": "integer"
          },
          "total_scored": {
           "type": "integer"
          },
          "matches": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "note": {
           "type": "string"
          }
         },
         "required": [
          "count",
          "matches",
          "note"
         ]
        }
       }
      }
     },
     "400": {
      "description": "No signals supplied or invalid JSON.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Match requires a paid-tier key or higher.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily tier limit reached.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/verify": {
   "get": {
    "summary": "Verify a settlement by name or official claim-site URL against the open and closed datasets. Any tier; counts against the caller's normal quota.",
    "parameters": [
     {
      "name": "name",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Settlement name to look up."
     },
     {
      "name": "url",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Claim-site URL to look up."
     },
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {},
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "responses": {
     "200": {
      "description": "Verification result: {found, name, status, deadline, official_claim_url, administrator, cah_url} or {found: false}.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "found": {
           "type": "boolean"
          },
          "name": {
           "type": "string"
          },
          "status": {
           "type": "string"
          },
          "deadline": {
           "type": "string",
           "nullable": true
          },
          "official_claim_url": {
           "type": "string",
           "nullable": true
          },
          "administrator": {
           "type": "string",
           "nullable": true
          },
          "cah_url": {
           "type": "string",
           "nullable": true
          }
         },
         "required": [
          "found"
         ]
        }
       }
      }
     },
     "400": {
      "description": "Neither name nor url supplied.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily anonymous or tier limit reached.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/alerts": {
   "get": {
    "summary": "Recent additions and settlements closing within 7 days (paid-tier key or higher). 'new' lists settlements whose first-seen date in the dataset is within the last 14 days; 'closing_7d' lists open settlements with a claim deadline in the next 7 days.",
    "parameters": [
     {
      "name": "key",
      "in": "query",
      "required": false,
      "description": "API key alternative to the Authorization bearer header.",
      "schema": {
       "type": "string"
      }
     }
    ],
    "security": [
     {
      "bearerAuth": []
     },
     {
      "apiKeyQuery": []
     }
    ],
    "responses": {
     "200": {
      "description": "Recent additions and settlements closing within 7 days.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "generated": {
           "type": "string",
           "format": "date"
          },
          "new_window_days": {
           "type": "integer"
          },
          "new": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "closing_7d": {
           "type": "array",
           "items": {
            "type": "object"
           }
          },
          "note": {
           "type": "string"
          }
         },
         "required": [
          "generated",
          "new",
          "closing_7d"
         ]
        }
       }
      }
     },
     "401": {
      "description": "Missing or invalid API key.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Alerts require a paid-tier key or higher.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "429": {
      "description": "Daily tier limit reached.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/checkout": {
   "post": {
    "summary": "Create a Stripe checkout session for the Pro plan.",
    "requestBody": {
     "required": false,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "email": {
          "type": "string",
          "format": "email"
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Checkout session created."
     },
     "502": {
      "description": "Stripe checkout failed.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Stripe is not configured.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/key-for-session": {
   "get": {
    "summary": "Redeem a completed checkout session for its API key.",
    "parameters": [
     {
      "name": "session_id",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "API key for the completed checkout."
     },
     "400": {
      "description": "Missing session_id or no email on the checkout.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "402": {
      "description": "Checkout is not paid yet.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "403": {
      "description": "Subscription is inactive or payment was refunded.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "404": {
      "description": "No key is available for this checkout.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     },
     "503": {
      "description": "Stripe is not configured.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  },
  "/v1/stripe-webhook": {
   "post": {
    "summary": "Stripe webhook receiver.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object"
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Event accepted."
     },
     "400": {
      "description": "Signature verification or JSON parsing failed.",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/Error"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearerAuth": {
    "type": "http",
    "scheme": "bearer",
    "description": "Class Action Hero API key."
   },
   "apiKeyQuery": {
    "type": "apiKey",
    "in": "query",
    "name": "key",
    "description": "Class Action Hero API key supplied as a GET query parameter."
   }
  },
  "schemas": {
   "Settlement": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "description": "Stable record ID (slug). Minted once, never reused; joins to the detail page at /s/{id}/ when one exists."
     },
     "name": {
      "type": "string",
      "description": "Settlement name (display text; may change \u2014 cite the id)."
     },
     "status": {
      "type": "string",
      "enum": [
       "open",
       "closed"
      ],
      "description": "open or closed."
     },
     "deadline": {
      "type": "string",
      "format": "date",
      "nullable": true,
      "description": "Claim deadline, YYYY-MM-DD, or null when no date is set."
     },
     "deadline_status": {
      "type": "string",
      "enum": [
       "dated",
       "tbd"
      ],
      "description": "dated when deadline is a real date; tbd when the deadline has not been announced."
     },
     "deadlineLabel": {
      "type": "string",
      "description": "Human-readable deadline."
     },
     "fund": {
      "type": "string",
      "description": "Published fund figure as display text, or 'not published'."
     },
     "fundNum": {
      "type": "number",
      "nullable": true,
      "description": "Total settlement fund in dollars. Non-null only when fundType is aggregate or verdict_estimate."
     },
     "fundType": {
      "type": "string",
      "enum": [
       "aggregate",
       "per_person",
       "unknown",
       "verdict_estimate"
      ],
      "description": "What fundNum measures: aggregate (total fund), per_person (a per-person amount; see perPersonMax), verdict_estimate, or unknown (no usable figure)."
     },
     "perPersonMax": {
      "type": "number",
      "nullable": true,
      "description": "Largest stated per-person amount in dollars, or null."
     },
     "currency": {
      "type": "string",
      "enum": [
       "USD",
       "CAD"
      ],
      "description": "ISO 4217 currency of fund figures: USD or CAD."
     },
     "eligibility": {
      "type": "string",
      "description": "Who qualifies, in plain language."
     },
     "proof": {
      "type": "string",
      "description": "Proof label derived from proof_enum (display text)."
     },
     "proof_enum": {
      "type": "string",
      "enum": [
       "none",
       "notice_id_only",
       "tiered",
       "required",
       "automatic",
       "unknown"
      ],
      "description": "Canonical proof state: none, notice_id_only, tiered, required, automatic, unknown."
     },
     "proof_verbatim": {
      "type": "string",
      "nullable": true,
      "description": "Proof language quoted from the official notice or claim form, when captured."
     },
     "tier_cap": {
      "type": "string",
      "nullable": true,
      "description": "Per-tier cap text quoted from the official notice, when captured."
     },
     "states": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "nullable": true,
      "description": "State codes the settlement is restricted to, sorted; null means nationwide."
     },
     "url": {
      "type": "string",
      "nullable": true,
      "description": "Official claim-filing URL, or null when there is no public claim site (see url_note)."
     },
     "url_note": {
      "type": "string",
      "nullable": true,
      "description": "Why there is no public claim URL, when recorded."
     },
     "unverified": {
      "type": "boolean",
      "description": "True when the record has not yet been verified against the official source."
     },
     "administrator": {
      "type": "string",
      "nullable": true,
      "description": "Settlement administrator detected from the official claim site, or null."
     },
     "admin_email": {
      "type": "string",
      "nullable": true
     },
     "admin_phone": {
      "type": "string",
      "nullable": true
     },
     "court": {
      "type": "string",
      "nullable": true,
      "description": "Court of record, when captured from primary documents."
     },
     "case_number": {
      "type": "string",
      "nullable": true,
      "description": "Case number, when captured from primary documents."
     },
     "last_verified": {
      "type": "string",
      "nullable": true,
      "description": "Date the record's proof language was verified against the official source (YYYY-MM-DD), or null."
     },
     "ca": {
      "type": "string",
      "description": "Analyst notes on the record (free text; may be empty)."
     },
     "bonus": {
      "type": "string",
      "description": "Derived subset of the ca notes: the note itself when it is a 'CA enhanced' note, else empty. Kept for the site's state-scope display; new consumers should use ca."
     },
     "source": {
      "type": "string",
      "description": "Attribution: always 'Class Action Hero'."
     },
     "source_url": {
      "type": "string",
      "description": "Attribution URL: https://classactionhero.app/api/"
     },
     "listing_url": {
      "type": "string",
      "nullable": true,
      "description": "Detail page URL on classactionhero.app, or null when the settlement has no detail page yet."
     },
     "added": {
      "type": "string",
      "nullable": true
     }
    },
    "required": [
     "id",
     "name",
     "status",
     "deadline",
     "deadline_status",
     "deadlineLabel",
     "fund",
     "fundNum",
     "fundType",
     "perPersonMax",
     "currency",
     "eligibility",
     "proof",
     "proof_enum",
     "proof_verbatim",
     "tier_cap",
     "states",
     "url",
     "url_note",
     "unverified",
     "administrator",
     "admin_email",
     "admin_phone",
     "court",
     "case_number",
     "last_verified",
     "ca",
     "bonus",
     "source",
     "source_url",
     "listing_url",
     "added"
    ]
   },
   "SettlementEnvelope": {
    "type": "object",
    "properties": {
     "count": {
      "type": "integer"
     },
     "generated": {
      "type": "string",
      "format": "date"
     },
     "attribution": {
      "type": "string"
     },
     "license": {
      "type": "string"
     },
     "license_url": {
      "type": "string",
      "format": "uri"
     },
     "terms": {
      "type": "string"
     },
     "canonical_url": {
      "type": "string",
      "format": "uri"
     },
     "settlements": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Settlement"
      }
     },
     "meta": {
      "type": "object",
      "description": "Present on anonymous /v1/settlements responses."
     }
    },
    "required": [
     "count",
     "generated",
     "attribution",
     "license",
     "license_url",
     "terms",
     "canonical_url",
     "settlements"
    ]
   },
   "Error": {
    "type": "object",
    "properties": {
     "error": {
      "type": "string"
     },
     "message": {
      "type": "string"
     },
     "upgrade": {
      "type": "string",
      "format": "uri"
     },
     "free_key_signup_url": {
      "type": "string",
      "format": "uri"
     },
     "resets": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "error"
    ]
   }
  }
 }
}
