Postal Developers
REST API

Analytics

Weekly dashboard, per-track engagement and top-track rankings.

Engagement is aggregated from the activity log: plays, views, downloads, saves, shares and comments on your tracks and playlists, from share pages, storefronts and the app.

All endpoints need scope read:analytics.

Dashboard

GET /api/v1/analytics/dashboard

This week's summary. The same numbers the app's home page shows.

data
{
  "thisWeek": {
    "rangeLabel": "1–7 Sep",
    "headline": "A busy week",
    "blurb": "12 uploads, 340 views and 58 downloads.",
    "uploaded": 12,
    "views": 340,
    "downloads": 58
  },
  "recentActivity": {
    "totalThisWeek": 61,
    "items": [
      { "id": "…", "title": "Downloaded Night Drive", "entityKey": "track", "entityId": "cm1x…", "sentAt": "…", "actor": {  } }
    ]
  },
  "tracks": { "total": 1284, "uploadedThisWeek": 12 },
  "yourSound": { "genre": "Downtempo", "mood": "Warm", "totalDurationLabel": "71 h 12 m" },
  "playlists": { "total": 37, "lastUpdatedAt": "…" }
}

Entity stats

GET /api/v1/analytics/stats?entity=track&ids=cm1x…,cm1y…&since=2026-08-01&until=2026-09-01
QueryTypeNotes
entitytrack | playlistRequired
idsCSV, 1–50Required
since, untilISO 8601Optional range
data
{
  "entity": "track",
  "range": { "since": "2026-08-01", "until": "2026-09-01" },
  "items": [
    {
      "id": "cm1x…",
      "name": "Night Drive",
      "artist": "…",
      "stats": { "plays": 120, "views": 210, "downloads": 18, "saved": 4, "shares": 6, "comments": 2 },
      "total": 360
    }
  ],
  "notFound": []
}

Ids that are deleted or not yours appear in notFound.

Top entities

GET /api/v1/analytics/top?metric=plays&entity=track&limit=10&since=2026-08-01
QueryTypeNotes
metricplays | views | downloads | saved | shares | commentsRequired
entitytrack | playlistDefault track
limit1–50Default 10
since, untilISO 8601
data
{
  "entity": "track",
  "metric": "plays",
  "range": { "since": "2026-08-01", "until": null },
  "items": [
    { "id": "cm1x…", "name": "Night Drive", "artist": "…", "count": 120 }
  ]
}

On this page