> ## Documentation Index
> Fetch the complete documentation index at: https://docs.atlasent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit chain

> Hash-linked, Ed25519-signed, append-only record of every decision.

Every call to `/v1/evaluate` — regardless of outcome — writes one entry to the audit chain. The chain is:

* **Append-only.** No UPDATE, no DELETE. Enforced at the database layer.
* **Hash-linked.** Each entry contains `prev_hash = SHA-256(previous entry)`. Any tampering mid-chain breaks the link and is visible at verify time.
* **Signed.** Periodic chain heads are signed with AtlaSent's Ed25519 key.
* **Exportable.** Ship the chain + the detached signature + the public key to any auditor. They can verify it with our open-source CLI on an air-gapped machine.

## Entry shape

Each row matches the `AuditEvent` schema in
the OpenAPI specification. `decision` and the decision-linking `decision_id` are top-level
columns; other per-decision detail (matched policy, permit token, deny
reason) is carried in the `payload` object so the chain shape stays
uniform across event types.

```json theme={null}
{
  "id": "aud_01HX6Z8FK2...",
  "org_id": "org_01HX...",
  "type": "evaluation.completed",
  "decision": "allow",
  "decision_id": "req_01HX6Z8...",
  "actor_id": "agent-001",
  "resource_type": "ehr_record",
  "resource_id": "patient-42",
  "payload": {
    "action_type": "ehr:write",
    "reason": "RACI rule ehr:write permits role=clinical_agent",
    "permit_token": "pt.v4.g6EBOKGBWCC4wNi5vZmZzZXQ..."
  },
  "previous_hash": "b6f9a1e8c4...",
  "hash": "41d73c8b2e...",
  "sequence": 84217,
  "occurred_at": "2026-04-19T14:02:18.112Z"
}
```

## What it satisfies

| Requirement | How |
| - | - |
| 21 CFR §11.10(c) — protection of records | Append-only + hash linking = tamper-evident |
| 21 CFR §11.10(e) — secure audit trails | Computer-generated on every call, immutable |
| EU Annex 11 §9 — audit trails | Timestamped, attributed, contemporaneous |
| ALCOA+ | Attributable (actor), Legible (JSON), Contemporaneous (ts), Original (not a copy), Accurate (server-generated) |

## Verifying offline

```bash theme={null}
atlasent-audit-verify --chain <export> --keys atlasent-audit-key.pem --require-signatures
```

`atlasent-audit-verify` is the open-source, offline verifier. Get the public key from [Audit signing key](/trust/audit-signing-key). See also [Quickstart → Export the audit bundle](/quickstart/audit-export).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.