Skip to main content
GET
/
api
/
v1
/
analytics
/
retention
Get retention data
curl --request GET \
  --url https://api.engagefabric.com/api/v1/analytics/retention
{
  "cohortType": "WEEKLY",
  "cohorts": [
    {
      "cohortId": "<string>",
      "cohortLabel": "Week 1 (Jan 6-12)",
      "playerCount": 123,
      "retention": {
        "day1": 123,
        "day7": 123,
        "day14": 123,
        "day30": 123,
        "day60": 123,
        "day90": 123
      },
      "engagement": {
        "avgXp": 123,
        "avgLevel": 123,
        "avgQuestsCompleted": 123
      }
    }
  ],
  "averages": {
    "day1": 123,
    "day7": 123,
    "day14": 123,
    "day30": 123
  }
}

Query Parameters

projectId
string
required

Project ID to get retention data for

Example:

"550e8400-e29b-41d4-a716-446655440000"

cohortType
enum<string>
default:WEEKLY

Cohort type for grouping

Available options:
WEEKLY,
MONTHLY,
CUSTOM

Response

200 - application/json

Retention data with cohort breakdown

cohortType
enum<string>
required

Type of cohort grouping

Available options:
WEEKLY,
MONTHLY,
CUSTOM
cohorts
object[]
required
averages
object
required