Input Fields
These are the fields you provide when you log an event. Onlyaction is required — everything else is optional but strongly recommended for useful audit trails.
string
required
The action that occurred, in
resource.verb format. Maximum 255 characters. Must match an entry in the compliance action catalog or be a registered custom action. This is the primary field used for filtering and compliance reporting.string
The internal identifier of the entity that performed the action. Maximum 255 characters. Use stable internal IDs (e.g.
user_123, svc_payments) — never PII such as email addresses or full names.string
The object that was affected by the action, in
type/id format (e.g. document/doc-456). Maximum 255 characters. Consistent formatting here makes resource-scoped queries significantly more powerful.object
Arbitrary key-value pairs that provide additional context for the event. No server-side key or depth restrictions are enforced, but the overall request body must stay within 256 KB for single-event requests or 2 MB for batch requests. Metadata is stored as-is and returned on every read — it is never indexed or transformed by AuditRails.
Action Naming Convention
AuditRails uses aresource.verb convention for action names. The table below lists the built-in actions across common compliance categories. You can register additional custom actions from the dashboard.
Enriched Fields
AuditRails automatically appends enriched fields to every event before storage. You never need to supply these — and you cannot override them. They are split into two groups: fields that are always present, and fields that are added when available.Always Present
These fields appear on every stored event without exception.string (ULID)
A globally unique, lexicographically sortable identifier for this event. ULIDs encode a millisecond-precision timestamp in their first 10 characters, making them ideal for cursor-based pagination.
string (UUID)
The UUID of the tenant that owns this event, derived from your API key at ingest time.
string (UUID)
The UUID of the project associated with the API key used to log the event.
integer
The version of the AuditRails event schema used to store this record. Currently
1. AuditRails will increment this value and provide a migration path for any breaking changes.string (ISO 8601 UTC)
The time AuditRails received and persisted the event, formatted as ISO 8601 in UTC (e.g.
2024-03-13T14:22:33.456Z). If you need to record when the event occurred on the client side, include a ts_client field in metadata or as a top-level enrichment (see below).Added When Available
AuditRails appends these fields automatically when the data can be resolved. Their absence does not indicate an error.IP address and geolocation fields (
ip_address, country, city) are excluded from hash computation. This means they can be updated by AuditRails (e.g. after a GeoIP database refresh) without invalidating your chain integrity. See Chain Fields below.Chain Fields
AuditRails implements a cryptographic hash chain across all events within a project. Each event is linked to the previous one, making any retroactive modification detectable. These fields are computed by AuditRails and cannot be supplied by you.integer
A monotonically increasing sequence number within the project’s chain. Gaps in
chain_seq indicate a tampered or missing event.string
A SHA-256 hash of this event’s canonical payload, encoded as 64 lowercase hex characters.
string
The
hash of the immediately preceding event in the chain. For the very first event in a project, this is a string of 64 zero characters (0000...0000).Canonical Payload for Hash Computation
The hash is computed over a strict, deterministic subset of fields. Enrichment and chain fields themselves are excluded to allow non-breaking updates (such as GeoIP re-resolution) without invalidating the chain.Full Example
Input (what you send)
Stored Event (what AuditRails persists)
The
log_id returned in the ingest response is the same ULID stored in the event record. You can use it immediately to retrieve the event via GET /v1/events/{log_id}.