Analytics API
Retrieve usage analytics, storage stats, and top-content data via the Emberly API.
The Analytics API provides insights into your file uploads, URL clicks, storage usage, and download activity. Most analytics endpoints work with both a bearer token and a session cookie.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
GET | /api/analytics/overview | Optional | Dashboard summary (user or global) |
GET | /api/analytics/summary | Session | Condensed stats for current user |
GET | /api/analytics/storage | Session | Storage breakdown and daily upload trend |
GET | /api/analytics/top-items | Optional | Top 10 files and URLs by activity |
GET | /api/analytics/metrics/activity | None | 30-day public activity metrics |
GET | /api/analytics/export | Session | Export analytics as CSV (advanced plans) |
Dashboard Overview
GET /api/analytics/overview
Returns a comprehensive summary of activity. When authenticated, returns your stats; when unauthenticated, returns global platform stats.
Auth: Optional (bearer token or session cookie)
Response (200):
User Summary
GET /api/analytics/summary
A condensed stat card for the currently authenticated user. Used by the dashboard header.
Auth: Session cookie required
Response (200):
Storage Analytics
GET /api/analytics/storage
Storage usage over time, broken down by file type.
Auth: Session cookie required
Response (200):
Top Items
GET /api/analytics/top-items
Returns the top 10 most downloaded files and top 10 most-clicked URLs. When authenticated, returns your items; when unauthenticated, returns global top items.
Auth: Optional
Response (200):
Public Activity Feed
GET /api/analytics/metrics/activity
Returns daily upload and URL creation counts for the past 30 days. This endpoint is public and requires no authentication.
Auth: None
Response (200):
Export Analytics as CSV
GET /api/analytics/export
Export your analytics data as a CSV file. Requires an advanced analytics plan (Flare or higher).
Auth: Session cookie required
Query Parameters:
| Parameter | Description |
|---|---|
type | files or urls |
from | ISO date — start of range |
to | ISO date — end of range |
Response: Content-Type: text/csv with Content-Disposition: attachment header.
Analytics export is available on Flare and above plans. A 403 is returned for lower-tier accounts.
Example:
Related
- Files API — upload and manage files
- URL Shortener API — create short links
- Plans Overview — which plan includes advanced analytics