Skip to main content
The Statistics API provides detailed analytics about link access, security events, and link status. Use these endpoints to monitor usage patterns, track security incidents, and analyze link performance.

Available Endpoints

Access Statistics

Monitor and analyze link access patterns:
  • Access Summary - Get overall access statistics including success, failure, and expiration metrics
  • Hourly Access - View access patterns broken down by hour of day
  • Daily Access - Track daily access trends over time
  • Access Failures - Analyze failed access attempts by failure type

Security Metrics

Track security events and link performance:

Use Cases

Dashboard Analytics

Combine multiple statistics endpoints to build comprehensive dashboards:
const [summary, hourly, linkStats] = await Promise.all([
  fetch('/api/stats/access/summary'),
  fetch('/api/stats/access/hourly'),
  fetch('/api/stats/links')
]);

Security Monitoring

Track potential security issues:
const securityData = await fetch('/api/stats/security/exceptions?limit=10');
const failures = await fetch('/api/stats/access/failures');

Performance Analysis

Identify your most popular links:
const topLinks = await fetch('/api/stats/links/top?limit=10');

Response Format

All statistics endpoints return JSON responses with relevant metrics. Numeric counts are returned as long integers, and percentages are calculated as doubles when applicable.

Rate Limiting

Statistics endpoints follow the same rate limiting rules as other API endpoints. See the Authentication page for details.

Build docs developers (and LLMs) love