API Documentation
Programmatic access to the SIGIL compliance platform. All endpoints live under /api/v1 and return JSON.
Authentication
Requests authenticate with a Bearer token in the Authorization header. Two token types are accepted:
- Session JWT — issued at login; the same token the web UI uses.
- API key — a long-lived per-user key starting with
sigil_, created on the API Keys page. Revoking a key takes effect immediately.
curl -H "Authorization: Bearer sigil_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
https://your-host/api/v1/incidents
Unauthenticated or invalid tokens receive 401; expired licenses receive 402; non-admin writes receive 403.
Read endpoints (open)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/products | List products and their CRA categories. |
| GET | /api/v1/incidents | List reported incidents. |
| GET | /api/v1/metrics | Platform metrics (evidence integrity, incidents, drills). |
| GET | /api/v1/evidence/:ref_id | Evidence chain for a reference ID. |
| GET | /api/v1/evidence/:ref_id/bundle | Signed evidence bundle (JSON 1.0) for a reference ID. |
| GET | /api/v1/drills | List compliance drills. |
| GET | /api/v1/drills/:drill_id | Drill details. |
Write endpoints (auth + license required)
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/incidents | Report an incident. |
| POST | /api/v1/filing/:incident_id/:filing_type | Generate a CRA filing for an incident. |
| POST | /api/v1/drills | Create a compliance drill. |
| POST | /api/v1/drills/:drill_id/start | Start a drill. |
| POST | /api/v1/drills/:drill_id/complete | Complete a drill. |
| POST | /api/v1/drills/:drill_id/fail | Mark a drill as failed. |
API key management (auth required)
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/api-keys | List your API keys. |
| POST | /api/v1/api-keys | Create a key. Body: {"name": "CI pipeline"}. Returns the key value once. |
| POST | /api/v1/api-keys/:key_id/revoke | Revoke a key (owner only). |
Example
# Create a key
curl -X POST -H "Authorization: Bearer <session-jwt>" \
-H "Content-Type: application/json" \
-d '{"name": "ci"}' \
https://your-host/api/v1/api-keys
# Use it
curl -H "Authorization: Bearer sigil_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
https://your-host/api/v1/metrics