Why Audit Logs Matter
Security investigations
When something goes wrong, trace exactly what happened, when, and who was responsible.
Compliance requirements
SOC 2, HIPAA, GDPR, and other frameworks require audit trails for sensitive operations.
Team visibility
Know when team members create, modify, or revoke keys — especially critical in shared workspaces.
Debugging
Figure out why a key stopped working, when a permission was changed, or who updated configuration.
What Gets Logged
Unkey automatically logs every mutation operation. Read operations are not logged — only actions that create, update, or delete resources.Logged Events by Category
- API Keys
- APIs
- Identities
- Rate Limiting
- Workspace
- Webhooks
Verification events (key.verify) are tracked in Analytics, not audit logs. Audit logs focus on configuration changes, not runtime operations.
Accessing Audit Logs
Dashboard
1
Navigate to Audit Logs
Sign into app.unkey.com and click Audit Logs in the sidebar
2
Browse events
See a chronological list of all workspace mutations
3
Click for details
Click any row to see complete request/response payloads and metadata

Log Entry Details
Each audit log entry contains:
Filtering Audit Logs
Use filters at the top of the audit log page to narrow down results:- By Event Type
- By Actor
- By Time Range
- By Resource
Filter by specific event categories:
- Keys: Only key-related events
- Permissions: Authorization changes
- Rate Limits: Rate limit configuration
- Workspace: Workspace-level changes
Common Use Cases
Security incident investigation
Security incident investigation
Scenario: A key was compromised and you need to understand the blast radius.Export evidence: Click “Export” to download logs for security reports.
1
Find when the key was created
Filter logs by
key.create and search for the key ID2
Check if it was modified
Look for
key.update events — was it given extra permissions?3
See who had access
Check the actor field — was it created via API or dashboard?
4
Verify revocation
Confirm
key.delete or key.update (enabled=false) event existsCompliance auditing
Compliance auditing
Scenario: Annual SOC 2 audit requires proof of access controls.Generate reports showing:
- All permission changes in the audit period
- Who granted/revoked access
- When keys were created/deleted
- Rate limit policy changes
- Permission Changes
- Key Lifecycle
Filter by:
permission.createpermission.deleteauthorization.*
Debugging configuration issues
Debugging configuration issues
Scenario: A key suddenly stopped working and the user claims they didn’t change anything.
1
Search for the key ID
Filter audit logs by resource ID
2
Look for recent changes
Check for
key.update events in the past 7 days3
Identify the change
Common culprits:
enabledset tofalseexpirestimestamp in the past- Rate limit reduced to 0
- Permission removed
4
Check who made the change
Was it a team member, API call, or automated process?
Team activity monitoring
Team activity monitoring
Scenario: You want to see what your team has been doing this week.Filter by:
- Time range: Last 7 days
- Actor: Each team member
- Onboarding review (did new hire create test keys?)
- Activity verification (is contractor still making changes?)
- Change management (what changed during the deployment?)
Automated system changes
Automated system changes
Scenario: Track changes made by automated systems or CI/CD.Filter by:
- Actor: Specific root key ID used by automation
- Are automated deploys creating/updating keys correctly?
- Did the migration script run successfully?
- Are rate limits being set programmatically as expected?
Log Retention
Audit logs are retained based on your plan:Exporting Logs
- Dashboard Export
- API Export (Enterprise)
- Continuous Export (Enterprise)
- Apply desired filters
- Click Export button
- Choose format: CSV or JSON
- Download begins automatically
Best Practices
Review logs regularly
Check audit logs weekly for unusual activity:
- Unexpected deletions
- Permission escalations
- Bulk changes
- Off-hours modifications
Use root keys sparingly
Root keys have full workspace access. Create narrow-scoped root keys for automation:
Export for compliance
If you need logs older than your retention period:
- Set up automated monthly exports
- Store in S3 or compliance vault
- Include in annual audit packages
Name root keys descriptively
When creating root keys, use clear names:
CI/CD Production DeployStripe Webhook HandlerAnalytics Export Script
Monitor for bulk changes
Set up alerts for:
-
10 keys deleted in 1 hour
-
50 keys created in 1 hour
- Mass permission changes
Document procedures
Create runbooks for:
- How to investigate security incidents
- Where to find specific log types
- Export procedures for auditors
- Retention policy documentation
Audit Log vs Analytics
Understand the difference:
Both are important:
- Audit logs answer “who changed what?”
- Analytics answer “how is it being used?”
Security Considerations
Audit logs are immutable
Audit logs are immutable
Once created, audit log entries cannot be modified or deleted by users. This ensures integrity for compliance and security investigations.
Actor attribution
Actor attribution
Every change is attributed to:
- User: Dashboard changes show user email
- Root key: API changes show root key ID and name
Request/response payloads
Request/response payloads
Full payloads are captured, which may include:
- Key values (only on creation)
- Metadata
- Configuration
Data privacy
Data privacy
For GDPR/CCPA compliance:
- Don’t store PII in key names or metadata
- Request deletion via support@unkey.com
- Logs for deleted resources remain (shows deletion event)
Enterprise Features
Enterprise plans include advanced audit log capabilities. Contact us to learn more.
Extended retention
Keep logs for years, not days:
- 1 year standard
- Multi-year available
- Unlimited retention for regulated industries
SIEM integration
Stream logs to security tools:
- Datadog
- Splunk
- Sumo Logic
- Custom webhooks
Advanced filtering
More powerful queries:
- Regex search
- Complex boolean logic
- Custom field matching
- SQL-like queries
Compliance reports
Automated report generation:
- SOC 2 evidence
- HIPAA audit trails
- Custom compliance formats
- Scheduled exports
Next Steps
Analytics
Track key usage and verification patterns
Security Overview
Learn how Unkey protects your data
Root Keys
Create and manage root keys for API access
API Reference
Complete API documentation