Authentication
All activity endpoints require authentication via therequireAuth middleware. Include a valid session token in your request.
Get Activity Logs
Retrieve paginated activity logs for the authenticated user with optional filtering.Query Parameters
Number of logs to return (1-100). Defaults to 50.
Number of logs to skip for pagination. Defaults to 0.
Filter logs by action type (partial match). Examples: “identity_created”, “passkey_added”, “identity_deleted”
Filter logs by severity level. Must be one of: “info”, “warning”, “danger”
Filter logs created on or after this datetime (ISO 8601 format)
Filter logs created on or before this datetime (ISO 8601 format)
Response
Array of activity log objects, ordered by creation date (newest first)
Unique identifier for the log entry
The action that was performed. Common actions include:
identity_created- New identity createdidentity_updated- Identity modifiedidentity_deleted- Identity removedpasskey_added- New passkey registeredpasskey_removed- Passkey deletedtrust_codes_regenerated- Trust codes regenerated
Additional context about the action. Structure varies by action type:
- For
identity_created:{ identityId: string, handle: string } - For
identity_updated:{ identityId: string, changes: string[] } - For
identity_deleted:{ identityId: string, handle: string } - For
passkey_added:{ passkeyId: string, name: string } - For
passkey_removed:{ passkeyId: string, name: string } - For
trust_codes_regenerated:{}
Severity level of the action:
info- Normal operations (create, update)warning- Potentially sensitive operations (delete, regenerate)danger- Critical security events
IP address from which the action was performed (from X-Forwarded-For or X-Real-IP headers)
Timestamp when the action occurred
Example Request
Example Response
Activity Log Events
Activity logs are automatically created when users perform the following actions:| Action | Severity | Triggered By |
|---|---|---|
identity_created | info | POST /api/identities |
identity_updated | info | PATCH /api/identities/:identityId |
identity_deleted | warning | DELETE /api/identities/:identityId |
passkey_added | info | POST /api/security/passkeys/complete |
passkey_removed | warning | DELETE /api/security/passkeys/:passkeyId |
trust_codes_regenerated | warning | POST /api/security/trust-codes/regenerate |