Skip to main content
GET
/
v0
/
lifecycle
Get user lifecycle stages (New / Returning / Power user / Resurrected / At Risk / Churned)
curl --request GET \
  --url https://api.formo.so/v0/lifecycle \
  --header 'Authorization: Bearer <token>'
{
  "meta": [
    {
      "name": "project_id",
      "type": "String"
    },
    {
      "name": "user_type",
      "type": "String"
    },
    {
      "name": "user_count",
      "type": "UInt64"
    }
  ],
  "data": [
    {
      "project_id": "proj_abc",
      "user_type": "New",
      "user_count": 184
    },
    {
      "project_id": "proj_abc",
      "user_type": "Returning",
      "user_count": 62
    },
    {
      "project_id": "proj_abc",
      "user_type": "Power user",
      "user_count": 23
    },
    {
      "project_id": "proj_abc",
      "user_type": "Resurrected",
      "user_count": 11
    },
    {
      "project_id": "proj_abc",
      "user_type": "At Risk",
      "user_count": 14
    },
    {
      "project_id": "proj_abc",
      "user_type": "Churned",
      "user_count": 142
    }
  ],
  "rows": 6,
  "rows_before_limit_at_least": 6
}
Counts wallet users in each lifecycle stage, computed against the activity window ending at date_to. Pass lifecycle_filter to return only one stage, or include_previous_period=true to also receive the prior window.

Authorizations

Authorization
string
header
required

Workspace API key (e.g. formo_xxx). Create one in the Formo dashboard under Team Settings > API Keys.

Query Parameters

date_from
string<date>

Inclusive start date (YYYY-MM-DD). Defaults to 7 days before date_to.

date_to
string<date>

Inclusive end date (YYYY-MM-DD). Defaults to today.

lifecycle_filter
enum<string>

Restrict results to a single lifecycle stage.

Available options:
New,
Returning,
Power user,
Resurrected,
At Risk,
Churned
include_previous_period
boolean

When true, returns both current and previous period metrics for week-over-week comparison. The previous period is non-overlapping and equal in length to the current range.

new_window_days
integer

Override: a wallet is New if first seen within this many days of the reference date (default 30). Caller value wins over the project's saved setting.

Required range: 1 <= x <= 90
churn_window_days
integer

Override: a wallet is Churned once last seen this many days before the reference date (default 30).

Required range: 1 <= x <= 90
power_user_min_active_days
integer

Override: distinct active days within the power-user window required to qualify as Power user (default 5).

Required range: 1 <= x <= 90
power_user_window_days
integer

Override: trailing window in which active days are counted for Power user qualification (default 30).

Required range: 1 <= x <= 90
resurrected_gap_days
integer

Override: minimum inactivity gap that marks a re-engaging wallet as Resurrected (default 30).

Required range: 1 <= x <= 90
at_risk_min_days_inactive
integer

Override: minimum days since last activity for an established, still-active wallet to be At Risk (default 14; must be < churn_window_days).

Required range: 1 <= x <= 90
at_risk_prior_active_days_threshold
integer

Override: minimum active days a wallet had in the window before the recent quiet stretch to qualify as At Risk (default 1).

Required range: 1 <= x <= 90

Response

Lifecycle counts

Analytics endpoint response. The data array contains the rows; the exact row shape depends on the endpoint. meta carries column type information for rendering, rows is the row count, and statistics holds query timing metadata.

data
object[]
meta
object[]
rows
integer
rows_before_limit_at_least
integer
statistics
object