Skip to main content

Audit Logs

GET /orgs/{orgId}/api/v1/admin/audit-logs
GET /orgs/{orgId}/api/v1/admin/audit-logs/{logId}
GET /orgs/{orgId}/api/v1/admin/audit-logs/stats
GET /orgs/{orgId}/api/v1/admin/audit-logs/actions
GET /orgs/{orgId}/api/v1/admin/audit-logs/export
GET /orgs/{orgId}/api/v1/admin/audit-logs/retention
PUT /orgs/{orgId}/api/v1/admin/audit-logs/retention

The audit log provides an immutable, tamper-evident record of all actions performed within an organization — by users, administrators, agents, and the LumoAuth platform itself.

Authentication​

All audit log endpoints require an admin API key or a Bearer token with admin:audit:read (retention update: admin:settings:write).

Each endpoint needs the credential's scope and a permission. A session or Bearer caller must hold the permission; for an API key its creator must still hold it. A missing permission returns 403 forbidden with details.required_permissions. See Required permissions.

MethodEndpointPermissionAPI-key / token scope
GET/admin/audit-logsaudit.viewadmin:audit:read
GET/admin/audit-logs/{logId}audit.viewadmin:audit:read
GET/admin/audit-logs/statsaudit.viewadmin:audit:read
GET/admin/audit-logs/actionsaudit.viewadmin:audit:read
GET/admin/audit-logs/retentionaudit.viewadmin:audit:read
PUT PATCH/admin/audit-logs/retentionsettings.manageadmin:settings:write
GET/admin/audit-logs/exportaudit.exportadmin:audit:read

Audit Log Entry Object​

A single-entry (GET /audit-logs/{logId}) response returns the full object below; list items expose the same fields minus the detail-only ones (eventTime, durationMs, initiatedBy, clientId, geoLocation, sessionId, requestId, statusReason, oldValue, newValue, context).

Audit Log Entry
{
"id": 4244,
"createdAt": "2026-03-01T08:00:00Z",
"eventType": "user.login",
"action": "login",
"severity": "info",
"message": null,
"actorId": "019d6190-9bba-7b5f-a0a5-07a6d10184d2",
"actorName": "Alice",
"actorType": "user",
"authMethod": "session",
"targetType": "user",
"targetId": "019d6190-9bba-7b5f-a0a5-07a6d10184d2",
"targetName": "Alice",
"ipAddress": "203.0.113.1",
"userAgent": "Mozilla/5.0 ...",
"status": "success",
"statusReason": null,
"clientId": "my-app",
"sessionId": "859d3386515a369646c54e0675e6500c",
"requestId": "2d92dd89-1b75-4e30-83ee-bb8fc05f574c",
"initiatedBy": "alice@example.com",
"eventTime": null,
"durationMs": null,
"geoLocation": null,
"oldValue": null,
"newValue": null,
"context": { "mfaMethod": "totp" }
}
note

The entry uses status ("success" / "failure") — there is no result field — and actorName rather than actorEmail. Numeric id, no orgId, and structured detail lives in context / oldValue / newValue rather than a metadata object.

List Audit Logs​

List Audit Logs
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs?startDate=2026-03-01T00:00:00Z&limit=50" \
-H "Authorization: ApiKey lmk_abc123"

Query Parameters​

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerResults per page (default: 25, max: 100)
searchstringFull-text search across log fields
userId or actorIdstringFilter by actor (user/agent/admin)
targetIdstringFilter by target resource
resourceType or targetTypestringFilter by target resource type
actionstringFilter by action (e.g. login)
severitystringFilter by severity (info, warning, error)
eventTypestringFilter by event type (e.g. user.login)
startDate or fromISO 8601Start of date range
endDate or toISO 8601End of date range
ipAddressstringFilter by source IP address
List Response
{
"data": [
{
"id": 4244,
"createdAt": "2026-03-01T08:00:00Z",
"eventType": "user.login",
"action": "login",
"severity": "info",
"actorId": "019d6190-9bba-7b5f-a0a5-07a6d10184d2",
"actorName": "Alice",
"actorType": "user",
"targetType": "user",
"targetId": "019d6190-9bba-7b5f-a0a5-07a6d10184d2",
"ipAddress": "203.0.113.1",
"status": "success"
}
],
"meta": {
"total": 2847,
"page": 1,
"limit": 50,
"totalPages": 57,
"hasNextPage": true,
"hasPreviousPage": false
},
"resourceType": "audit_logs"
}

Get Single Log Entry​

Get a Single Log Entry
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/01JF3KAUDIT..." \
-H "Authorization: ApiKey lmk_abc123"

Audit Log Statistics​

Get Statistics
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/stats" \
-H "Authorization: ApiKey lmk_abc123"

Query Parameters for Stats​

ParameterDescription
fromStart of time window (ISO 8601)
toEnd of time window (ISO 8601)

The response groups counts by event type, action and severity.

List Available Actions​

Returns a distinct list of all action types present in the audit log for the organization.

List Available Actions
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/actions" \
-H "Authorization: ApiKey lmk_abc123"
Actions Response
{
"data": ["authenticate", "create", "delete", "login", "revoke", "update"]
}

Export Audit Logs​

Export is synchronous: the endpoint streams the file back directly with Content-Disposition: attachment (HTTP 200). Use the -o/--output flag (or your client's stream/download API) to save it — the body is the CSV/JSON file itself, not a JSON envelope.

Export as CSV
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/export?format=csv&startDate=2026-01-01T00:00:00Z&endDate=2026-03-31T23:59:59Z" \
-H "Authorization: ApiKey lmk_abc123" \
-o audit-logs-q1-2026.csv
Export as JSON
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/export?format=json&startDate=2026-01-01T00:00:00Z&endDate=2026-03-31T23:59:59Z" \
-H "Authorization: ApiKey lmk_abc123" \
-o audit-logs-q1-2026.json

Export Parameters​

ParameterValuesDefault
formatcsv, jsoncsv
startDate / fromISO 8601—
endDate / toISO 8601—

Exports are limited to 10,000 records per request.

Retention Settings​

Get Retention Settings​

Get Retention Settings
curl "https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/retention" \
-H "Authorization: ApiKey lmk_abc123"
Retention Response
{
"data": {
"retentionDays": 90,
"autoDelete": true
}
}

Update Retention Settings​

Update Retention Settings
curl -X PUT https://app.lumoauth.dev/orgs/acme-corp/api/v1/admin/audit-logs/retention \
-H "Authorization: ApiKey lmk_abc123" \
-H "Content-Type: application/json" \
-d '{
"retentionDays": 365,
"autoDelete": true
}'

autoDelete: false keeps audit rows forever. With autoDelete: true, rows older than retentionDays (never less than 90) are pruned by a daily platform job, but only when the organization has data retention enabled in its GDPR settings. See Log retention.

Common Event Types​

EventDescription
user.loginSuccessful user sign-in (browser session created)
login.failedFailed password, passkey, magic-link or push sign-in
session.revokedA session ended: sign-out, or revoked by the user or an administrator
user.createdNew user provisioned
user.updatedUser profile updated
user.deletedUser deleted (a full GDPR erasure; gdpr.erasure.completed is written too)
user.blockedUser account blocked
user.password_changedPassword changed (metadata.source says how)
mfa.enabledA user enrolled their first MFA factor
mfa.challenge.succeeded / mfa.challenge.failedMFA challenge passed / failed
mfa.push.reported_fraudA user reported a push request as "This wasn't me"
mfa.tap.issuedAn admin issued a temporary access code
mfa.policy.changedThe organization MFA policy changed
oauth.access_token_issuedOAuth tokens issued (authorization code, CIBA or device code grant)
token.revokedOAuth tokens revoked by an administrator
client.createdOAuth client registered
admin.tenant.*, admin.user.*Action taken on this organization or its users by LumoAuth operators
role.assignedRole granted to a user or group
oauth.authorization_issuedA user completed authorization and the application received its response

Every event type LumoAuth writes is listed, by category, in Audit logs → Event categories. The full list of mfa.* events is in Audit logs → MFA events. Privilege changes, signing keys, agents, webhooks, revocations, exports and failed authentication are listed under Security-relevant events.

password_reset_requested was renamed to password_reset.requested on 2026-09-25; update saved eventType filters.

Actor fields​

actorType is user, api_key, agent, scim or system, and authMethod is session, api_key, bearer, scim, agent or system. For API-key and agent actors, metadata.actor_owner_id holds the user who created the key or owns the agent, and metadata.api_key_id / metadata.oauth_client_id identify the credential. See Who did it.

On single entries, oldValue / newValue now carry the recorded before/after values (they were always null before 2026-09-25), and changes returns the raw change set.

warning

Changes LumoAuth operators make to an organization or its users are written as admin.tenant.*, admin.user.* and billing.admin_* events in that organization's log, and admin.tenant.* / admin.user.* always raise a high-risk alert.