Skip to content

API — Audit Log

Activity log tracking sensitive actions for each user.


List logs

GET /api/audit 🔒

Returns audit logs for the authenticated user, paginated and sorted by descending date.

Query params

ParamDefaultDescription
page1Page number
limit20Number of results per page
action(all)Filter by action type

Response 200

json
{
  "data": [
    {
      "id": "uuid",
      "user_id": "uuid",
      "action": "user.login",
      "target_type": null,
      "target_id": null,
      "details": { "ipAddress": "192.168.1.1" },
      "ip_address": "192.168.1.1",
      "created_at": "2026-03-30T10:00:00Z"
    }
  ],
  "total": 42,
  "page": 1,
  "limit": 20
}

Tracked actions

ActionTrigger
user.registerUser registration
user.loginPassword login
user.login_ssoGoogle SSO login
user.2fa_enable2FA activation
user.2fa_disable2FA deactivation
rule.createRule creation
rule.create_from_templateRule creation from template
rule.updateRule modification
rule.deleteRule deletion
rule.toggleRule enable/disable
rule.runManual rule execution
bulk.trashBulk operation: move to trash
bulk.deleteBulk operation: delete
bulk.archiveBulk operation: archive
bulk.labelBulk operation: add label
bulk.mark_readBulk operation: mark as read

Fail-safe

Audit log writing is fail-safe: a write error is logged to the console but never blocks the main action.