API Reference
Base URL:https://api.courtrules.app
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/courts | List all federal district courts |
GET | /api/v1/courts/:id | Get a single court’s details |
GET | /api/v1/judges | List judges for a district |
GET | /api/v1/rules | Get applicable rules for a judge |
POST | /api/v1/check | Check document compliance |
POST | /api/v1/classify | LLM-powered document classification |
GET | /api/v1/openapi.yaml | Download the OpenAPI specification |
Authentication
All endpoints require a Bearer token in theAuthorization header:
OpenAPI specification
The complete OpenAPI 3.1 spec is available for download:Content type
AllPOST requests must use Content-Type: application/json.
All responses are application/json.
Error responses
Error responses follow a consistent format:HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Invalid request (missing params, validation failure) |
401 | Missing or invalid Authorization header |
403 | Invalid API key, or district not yet accessible |
404 | Resource not found (judge not in district, unknown district ID) |
502 | Upstream failure (LLM error on /classify) |