Quickstart
Run the server locally, set your API key, and call the API. Every example below works against the real product.
1. Start the server
python3 -m foiaflow.app # stdlib only, no install needed
2. Set your API key
export FOIAFLOW_API_KEY="your-key-here" # see .env.example
When the key is set, programmatic /api/* calls require an X-API-Key header. Full endpoint reference: OPENAPI.md in the repo.
3. Try it
File a request
curl -s -X POST localhost:8472/api/requests -H "Content-Type: application/json" -H "X-API-Key: $FOIAFLOW_API_KEY" -d '{"subject":"Body-cam footage","agency":"City Police Dept","jurisdiction_id":"fl-state"}'Advance the status
curl -s -X PUT localhost:8472/api/requests/1 -H "Content-Type: application/json" -H "X-API-Key: $FOIAFLOW_API_KEY" -d '{"status":"filed"}'Generate the request letter
curl -s localhost:8472/api/requests/1/request-letterOverdue radar
curl -s localhost:8472/api/alerts