Get an audit event
GET /v1/audit-events/{event_id} · permission audit-events:read
Returns one audit record from either stream (admin or application).
Request
| Parameter | In | Required | Description |
|---|---|---|---|
event_id |
path | yes | Audit record id, prefixed with evt_. |
Response
200 OK and the record, in the same shape as an item of List audit events. Empty fields are null.
ip and user_agent are present only when the key has the audit-events:read_ip permission (filled only for records younger than 13 months); without it the fields are left out entirely.
{
"id": "evt_01j9xk3m7q8r2s4t6v8w0y2z4a",
"stream": "admin",
"seq": 4182,
"schema_version": 1,
"action": "user.blocked",
"category": "administration",
"outcome": "success",
"reason_code": null,
"occurred_at": "2026-10-01T08:15:42.120Z",
"received_at": "2026-10-01T08:15:42.131Z",
"recorded_at": "2026-10-01T08:15:42.140Z",
"clock_anomaly": false,
"actor_type": "api_key",
"actor_id": "key_01j9xk3m7q8r2s4t6v8w0y2z4d",
"act_chain": null,
"session_id": null,
"auth_context": null,
"elevation_ref": null,
"org_id": null,
"targets": [
{"type": "user", "id": "usr_0a1b2c3d4e5f6g7h8j9k0m1n2p", "org_id": null, "name": null}
],
"application_id": null,
"ip": "203.0.113.7",
"ip_prefix": "203.0.113.0/24",
"ip_country": "DE",
"ip_asn": 64500,
"user_agent": "keenauth-go/1.4.0 (go/1.25.3)",
"user_agent_family": "keenauth-go",
"request_id": "0192a6c1-7d3e-7a10-9b2c-3d4e5f607182",
"correlation_id": null,
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
"producer_service": "directory",
"policy_ref": "perm:users:write",
"changes": {"status": {"old": "active", "new": "blocked"}},
"metadata": null,
"prev_hash": "n4bQgYhMfWWaL-qgxVrQFaO_TxsrC4Is0V1sFbDwCgg",
"org_prev_hash": null,
"record_hash": "LCa0a2j_xo_5m0U8HTBBNBNCLXBkg7-g-YpeiGJm564"
}
Errors
Every error is an application/problem+json body with a stable code.
| HTTP | code |
When |
|---|---|---|
| 401 | unauthenticated |
The API key is missing, invalid or revoked. |
| 403 | insufficient_permissions |
The key lacks audit-events:read. |
| 404 | not_found |
The record does not exist, belongs to another environment, is outside the retention window, or the id is malformed. |
| 429 | rate_limited |
The rate limit was exceeded; honor Retry-After. |
| 503 | service_unavailable |
A dependency is temporarily unavailable; retry later. |
Example
curl https://api.eu.keenauth.com/v1/audit-events/evt_01j9xk3m7q8r2s4t6v8w0y2z4a \
-H "Authorization: Bearer $KEENAUTH_SECRET_KEY"
keenauth audit-events get evt_01j9xk3m7q8r2s4t6v8w0y2z4a
Personal data
This endpoint carries personal data: audit events. Personal data in the KeenAuth APIs describes what is stored, how long it is kept and how it is deleted. Do not send special categories of personal data (health, biometric data, religion, political opinions, sexual orientation) in any field.