Skip to main content
Unkey automatically captures detailed analytics for every API key verification, giving you real-time visibility into how your API is being used, who’s using it, and when anomalies occur.

What Gets Tracked

Every key verification generates analytics data:

Verification events

Successful and failed verification attempts with timestamps and outcomes

Usage patterns

Request frequency, peak times, and traffic trends per key or identity

Rate limit violations

When keys hit rate limits and which limits are being exceeded

Credit consumption

Usage limit tracking — how many credits remain and when they’re depleted

Geographic distribution

Where requests are coming from globally (by region)

Error patterns

Failed verifications: expired keys, disabled keys, insufficient permissions

Dashboard Analytics

Access analytics through the Unkey dashboard:
1

Navigate to Analytics

Sign into app.unkey.com and click Analytics in the sidebar
2

Select your API

Choose which API to analyze from the dropdown
3

Choose time range

Filter by last 24 hours, 7 days, 30 days, or custom date range

Available Views

High-level metrics:
  • Total verifications (successful + failed)
  • Success rate percentage
  • Active keys count
  • Top consumers by volume
  • Verification trends over time
Use this to monitor overall API health and identify growth patterns.

Verification Logs

View detailed logs of every verification attempt:
  1. Go to Keys in the dashboard
  2. Click on any key
  3. Navigate to the Verifications tab
Each log entry shows:
  • Timestamp (with millisecond precision)
  • Outcome (VALID, RATE_LIMITED, etc.)
  • Request metadata (if provided during verification)
  • Identity info (if key is linked)
  • Rate limit state
  • Credits consumed

Programmatic Analytics

Query analytics data programmatically via the Unkey API.
The Analytics API is available on Pro and Enterprise plans. It requires a root key with analytics.query permission.

Common Analytics Queries

In the dashboard:
  1. Go to Analytics → Overview
  2. Check the Top Keys widget
  3. Sort by verification count
Via API: Query all keys and sum their verification counts:
Track which keys are hitting limits:
  1. Go to Analytics → Errors
  2. Filter by code: RATE_LIMITED
  3. Identify patterns:
    • Same key repeatedly hitting limits → User needs upgrade
    • Sudden spike in violations → Possible abuse or bug
    • Specific time of day → Workload scheduling issue
Set up alerts: Use the Audit Log API to build custom alerting:
Monitor which keys are running out of credits:
Identify anomalies that might indicate compromise:
  • Sudden spike in usage: Key making 10x normal requests
  • New geographic locations: Key suddenly used from different continent
  • Off-hours activity: Key active at unusual times
  • High failure rate: Many INSUFFICIENT_PERMISSIONS errors (possible attack)
Build custom monitoring:
Generate usage-based invoices:

Custom Dashboards

Build custom analytics dashboards for your users:

Alerting & Monitoring

Set up automated alerts for critical events:

Credit depletion

Alert users when credits drop below threshold:

Rate limit violations

Notify when users consistently hit limits:

Unusual activity

Detect potential security issues:

Failed verifications

Track authentication failures:

Analytics Best Practices

Check these metrics every day:
  • Total verifications: Are they growing?
  • Success rate: Should be >99%
  • Top consumers: Who are your power users?
  • Error trends: Are failures increasing?
Generate weekly/monthly reports:
  • Email stakeholders with usage summaries
  • Track growth trends
  • Identify opportunities for upsells
  • Spot potential churn (declining usage)
Store context in key metadata for better analytics:
Then segment analytics by industry, plan, etc.
Connect API usage to business outcomes:
  • Do power users have higher retention?
  • Does usage predict upsells?
  • Which features drive the most API calls?
Automate responses to usage patterns:
  • Low usage → Re-engagement email
  • High usage → Upsell offer
  • Depleted credits → Prompt to add more
  • Rate limits hit → Upgrade prompt

Compliance & Data Privacy

Data retention: Analytics data is retained according to your plan. For GDPR/CCPA compliance, you can request deletion of specific key analytics.PII handling: Unkey does not capture request payloads or response bodies — only metadata. Never store PII in key names or metadata unless encrypted.

Next Steps

Audit Logs

Track who made changes to keys and configuration

Rate Limiting

Understand how rate limit analytics work

API Reference

Complete analytics API documentation

Webhooks

Receive real-time notifications for key events