API reference
Audit export
The audit trail for your SIEM, pushed or pulled, and a signed evidence bundle for auditors.
Three ways to take the record out of Tracehold. Your connector can also keep its own copy of the whole chain in a bucket of yours, on every plan.
| Plan | For | |
|---|---|---|
| Streaming to Splunk or Datadog | Enterprise | A SIEM that ingests continuously |
| Pulling NDJSON | Team and Enterprise | Any SIEM or script |
| The evidence bundle | Team and Enterprise | Auditors and due diligence |
Streaming to Splunk or Datadog#
Audit → Log export: add a destination, either a Splunk HTTP Event Collector (its address and token) or Datadog Logs (your site and API key). Tracehold pushes new audit entries there about every minute and resumes where it left off after a failure; Test sends the latest entries to check it works. The token or key is stored encrypted and never shown back.
Pulling NDJSON#
For SIEM ingestion, pull the audit log as NDJSON:
curl -N \
-H "Authorization: Bearer <jwt>" \
"https://api.tracehold.ai/api/v1/audit/exports/stream?since=2026-04-01T00:00:00Z"
One JSON object per line, one line per audit row, in sequence order. To resume, pass ?since_seq=<last sequence_number + 1>. <jwt> is an owner's or admin's sign-in token (POST /api/v1/auth/login), valid for 15 minutes; there is no long-lived API key, so for continuous ingestion use audit streaming to Splunk or Datadog (Enterprise) or your connector's copy in your bucket.
Signed compliance bundle#
For point-in-time evidence (audits, customer due-diligence):
curl -X POST \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{"start_date": "2026-01-01", "end_date": "2026-03-31"}' \
-o compliance-Q1-2026.zip \
"https://api.tracehold.ai/api/v1/compliance/export/bundle"
The zip contains:
| File | Purpose |
|---|---|
actions.json | Every call in the period: action, risk, decision and reason, environment, whether it ran |
audit_chain.json | Every audit row in the period |
credentials.json | Every one-call key your connector used in the period: scope and expiry, never the key |
coverage.json | NIST and OWASP ASI control coverage in the period |
chain_proof.json | The first and last sequence numbers and their hashes |
MANIFEST.json | SHA-256 of every payload file |
SIGNATURE | HMAC-SHA256 over the exact bytes of MANIFEST.json |
README.md | Verification steps |
Verifying the bundle offline#
# 1. Verify each file hash matches MANIFEST.json
python -c "
import hashlib, json
m = json.load(open('MANIFEST.json'))
for f in m['files']:
h = hashlib.sha256(open(f['name'], 'rb').read()).hexdigest()
assert h == f['sha256'], f['name']
print('OK', f['name'])
"
# 2. Compare chain_proof.json with your own copy of the chain
python -c "
import glob, json
p = json.load(open('chain_proof.json'))
mine = {}
for f in glob.glob('my-audit-copy/*.ndjson'): # tracehold/audit/ in your bucket
for line in open(f):
e = json.loads(line)
mine[e['sequence_number']] = e['entry_hash']
assert mine[p['last_sequence']] == p['last_entry_hash'], 'does not match your copy'
print('OK: entry', p['last_sequence'], 'matches your copy')
"
Your copy is the one your connector keeps in your own S3 bucket
(TRACEHOLD_CONNECTOR_AUDIT_BUCKET, under tracehold/audit/; see
the connector). Someone who rewrote Tracehold's
history could not also rewrite that copy.
SIGNATURE is an HMAC-SHA256 under Tracehold's audit signing key. An HMAC
has no public half, and that key also signs the audit chain, so it never
leaves Tracehold: only Tracehold can check the signature.