Skip to content
IForevents Docs
IForevents Docs
HomeDashboardGitHubPrivacyTermsSecurityIntroduction
Support and SLA

Cohort retention: daily, weekly or monthly, with optional entry and return events and an entry-event breakdown

POST
/v1/analytics/retention

Authorization

AuthorizationBearer <token>

Session token issued by the accounts service (or the legacy /v1/auth routes).

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/analytics/retention" \  -H "Content-Type: application/json" \  -d '{    "end": "2026-09-13T12:30:45Z",    "periods": 8,    "start": "2026-07-01T00:00:00Z"  }'
{  "retention": {    "cohorts": [      {        "cells": [          "complete",          "complete",          "partial",          "future"        ],        "cohort": "2026-07-06T00:00:00Z",        "complete": true,        "rates": [          100,          66.7,          50.8,          null        ],        "retained": [          120,          80,          61,          null        ],        "size": 120      }    ],    "interval": "week",    "observed_until": "2026-09-13T12:30:45Z",    "periods": 3  }}
breakdown?
breakdown_limit?integer
cohort_uuid?string
Formatuuid
end?string
Formatdate-time
entry_event?
interval?string
periods?integer

Number of weekly periods to report; defaults to 8.

return_event?
start?string
Formatdate-time