Skip to content

Audit API

GET /audit/chain

Get audit trail entries.

bash
curl "https://sovrapp.com/api/sovr/audit/chain?limit=100&offset=0" \
  -H "x-api-key: sk_..." \
  -H "x-tenant-id: tenant_123"

Response

json
{
  "success": true,
  "data": [
    {
      "id": "aud_abc123",
      "timestamp": "2026-02-05T05:00:00Z",
      "eventType": "gate.decision",
      "data": {
        "action": "send_email",
        "decision": "allow"
      },
      "hash": "sha256:..."
    }
  ]
}

POST /audit/verify

Verify audit chain integrity.

bash
curl -X POST https://sovrapp.com/api/sovr/audit/verify \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_..." \
  -H "x-tenant-id: tenant_123" \
  -d '{
    "startDate": "2026-01-01",
    "endDate": "2026-02-05"
  }'

Response

json
{
  "success": true,
  "data": {
    "valid": true,
    "entriesChecked": 15420,
    "firstEntry": "aud_001",
    "lastEntry": "aud_15420"
  }
}

POST /audit/log

Write a custom audit entry.

bash
curl -X POST https://sovrapp.com/api/sovr/audit/log \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_..." \
  -H "x-tenant-id: tenant_123" \
  -d '{
    "eventType": "custom.event",
    "data": { "key": "value" },
    "userId": "user_123"
  }'

The AI Responsibility Layer