API
Retention endpoint
This endpoint returns the cohort table from the Retention report. Scope: analytics:read. Public sites and private links can call it.
Last updated . This guide belongs to Retention.
GET /sites/:siteId/retention
| Parameter | Values | Default |
|---|---|---|
mode | day or week | week |
range | Days to look back, from 7 to 365 | 90 |
This endpoint does not use the shared time parameters, time_zone or filters. Set the period with range.
{ "data": { "cohorts": { "2026-11-09": { "size": 344, "percentages": [100, 12.5, null] } }, "maxPeriods": 2, "mode": "week", "range": 90 } }
Each key under cohorts is the first day of a cohort. size is the number of visitors in it. percentages holds the share that was active in each later period, starting with the cohort's own period.
null means the period has not happened yet.