Audit Ledger

The GovernLayer audit ledger is a SHA-256 hash-chained, immutable record of every governance decision. Each entry is cryptographically linked to the previous one — if any record is tampered with, the chain breaks.

The ledger entry model

Properties

  • Name
    id
    Type
    integer
    Description

    Auto-incrementing ledger entry ID.

  • Name
    system_name
    Type
    string
    Description

    The AI system this decision applies to.

  • Name
    decision
    Type
    string
    Description

    The governance decision: APPROVE, FLAG, or ESCALATE.

  • Name
    drift_score
    Type
    float
    Description

    The drift score at the time of the decision.

  • Name
    risk_level
    Type
    string
    Description

    Risk level: LOW, MEDIUM, HIGH, or CRITICAL.

  • Name
    current_hash
    Type
    string
    Description

    SHA-256 hash of this record.

  • Name
    previous_hash
    Type
    string
    Description

    SHA-256 hash of the previous record (chain link).

  • Name
    timestamp
    Type
    string
    Description

    ISO 8601 timestamp.


GET/v1/ledger

List ledger entries

Retrieve the audit ledger. Returns entries in reverse chronological order.

Optional parameters

  • Name
    system_name
    Type
    string
    Description

    Filter by AI system name.

  • Name
    skip
    Type
    integer
    Description

    Number of entries to skip (default: 0).

  • Name
    limit
    Type
    integer
    Description

    Number of entries to return (default: 50, max: 100).

Request

GET
/v1/ledger
curl -G https://api.governlayer.ai/v1/ledger \
  -H "X-API-Key: gl_your_api_key_here" \
  -d limit=3

Response

{
  "total": 1847,
  "data": [
    {
      "id": 1847,
      "system_name": "support-agent",
      "decision": "ESCALATE",
      "drift_score": 0.87,
      "risk_level": "HIGH",
      "current_hash": "sha256:a1b2c3d4...",
      "previous_hash": "sha256:e5f6a7b8...",
      "timestamp": "2026-04-25T14:30:00Z"
    },
    {
      "id": 1846,
      "system_name": "pricing-bot",
      "decision": "APPROVE",
      "drift_score": 0.12,
      "risk_level": "LOW",
      "current_hash": "sha256:e5f6a7b8...",
      "previous_hash": "sha256:c9d0e1f2...",
      "timestamp": "2026-04-25T14:28:00Z"
    }
  ]
}

GET/v1/ledger/verify

Verify chain integrity

Verify the integrity of the hash chain. Returns whether the chain is valid and the total number of entries verified.

Request

GET
/v1/ledger/verify
curl https://api.governlayer.ai/v1/ledger/verify \
  -H "X-API-Key: gl_your_api_key_here"

Response

{
  "chain_valid": true,
  "entries_verified": 1847,
  "genesis_hash": "sha256:GOVERNLAYER_GENESIS",
  "latest_hash": "sha256:a1b2c3d4..."
}

Was this page helpful?