Compliance API

Endpoint — review flags

GET /api/v1/compliance/review_flags

States currently flagged for editorial review — because the weekly source monitor detected a change on the state's government source page, or because a state was flagged manually — plus states whose data is going stale (not verified in 6+ months).

This is the one public endpoint: no API key required. It exists so automated refresh tooling (which runs outside the app) can prioritize flagged states. Responses are cached for 5 minutes and keyless requests share a per-IP rate limit.

A flag means "a human or agent should re-verify this state," not "the rule changed." Published state data is unaffected until a YAML edit merges.

Example

curl https://homeschoolfox.com/api/v1/compliance/review_flags
{
  "data": {
    "generated_at": "2026-07-06T10:05:00Z",
    "flagged": [
      {
        "abbreviation": "CA",
        "name": "California",
        "yaml_path": "data/compliance/states/CA.yml",
        "last_verified_at": "2026-06-15T00:00:00Z",
        "flagged_reason": "Flagged: Source page changed on 2026-07-06 — https://www.cde.ca.gov/sp/ps/homeschool.asp",
        "changed_url": "https://www.cde.ca.gov/sp/ps/homeschool.asp",
        "changed_at": "2026-07-06T10:02:41Z"
      }
    ],
    "stale": [
      {
        "abbreviation": "WY",
        "name": "Wyoming",
        "yaml_path": "data/compliance/states/WY.yml",
        "last_verified_at": "2025-12-20T00:00:00Z"
      }
    ]
  },
  "meta": { "api_version": "v1", "count_flagged": 1, "count_stale": 1 }
}

Fields

  • flagged — states with an active review flag, alphabetical. flagged_reason is the most recent flag note; changed_url / changed_at point at the most recent successful source fetch.
  • stale — states past the 6-month verification window that aren't already flagged.