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:

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)

MethodPathDescription
GET/api/v1/productsList products and their CRA categories.
GET/api/v1/incidentsList reported incidents.
GET/api/v1/metricsPlatform metrics (evidence integrity, incidents, drills).
GET/api/v1/evidence/:ref_idEvidence chain for a reference ID.
GET/api/v1/evidence/:ref_id/bundleSigned evidence bundle (JSON 1.0) for a reference ID.
GET/api/v1/drillsList compliance drills.
GET/api/v1/drills/:drill_idDrill details.

Write endpoints (auth + license required)

MethodPathDescription
POST/api/v1/incidentsReport an incident.
POST/api/v1/filing/:incident_id/:filing_typeGenerate a CRA filing for an incident.
POST/api/v1/drillsCreate a compliance drill.
POST/api/v1/drills/:drill_id/startStart a drill.
POST/api/v1/drills/:drill_id/completeComplete a drill.
POST/api/v1/drills/:drill_id/failMark a drill as failed.

API key management (auth required)

MethodPathDescription
GET/api/v1/api-keysList your API keys.
POST/api/v1/api-keysCreate a key. Body: {"name": "CI pipeline"}. Returns the key value once.
POST/api/v1/api-keys/:key_id/revokeRevoke 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