Event Envelope
Every event in Trailproof uses the same 10-field envelope. Your domain-specific data goes inpayload — Trailproof handles the rest.
Trailproof doesn’t validate or inspect payload contents. It stores them opaquely. Your application is responsible for payload structure.
TrailEvent Fields
| Field | Type | Required | Description |
|---|---|---|---|
event_id | string | yes | UUID v4, auto-generated by Trailproof |
event_type | string | yes | Namespaced type (e.g., myapp.user.login) |
timestamp | string | yes | ISO-8601 UTC, auto-generated by Trailproof |
actor_id | string | yes | Who performed the action |
tenant_id | string | yes | Tenant/org isolation key |
trace_id | string | no | Cross-system correlation ID |
session_id | string | no | Session grouping ID |
payload | object | yes | Domain-specific data (opaque to Trailproof) |
prev_hash | string | yes | Hash of the previous event |
hash | string | yes | SHA-256 hash of this event |
signature | string | no | HMAC-SHA256 signature (if signer configured) |
Auto-Generated vs. Caller-Provided
You provide (required):event_type— what happenedactor_id— who did ittenant_id— which tenant (use"default"for single-tenant)payload— domain-specific data
trace_id— correlate events across systemssession_id— group events within a session
event_id— UUID v4timestamp— ISO-8601 UTCprev_hash— from the hash chainhash— SHA-256 of the eventsignature— if a signing key is configured
Event Type Convention
Event types follow a namespaced pattern:{project}.{domain}.{action}
Example
Validation
Trailproof validates required fields onemit(). Missing or empty required fields throw a ValidationError:
Python
Next Steps
Hash Chain
How events are cryptographically linked.
API Reference
Full API documentation for both SDKs.