Skip to main content
GET
Get user lifecycle stages (New / Returning / Power user / Resurrected / At Risk / Churned)
Counts wallet users in each lifecycle stage, computed against the activity window ending at date_to. To return only one stage, add a lifecycle entry to the filters array, for example filters=[{"field":"lifecycle","op":"in","value":"Churned"}]. Pass 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.

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.

filters
string

Array of filter conditions, JSON-encoded in the query string. Entries use { field, op, value } and are combined with implicit AND. For example, filter traffic referred by Google with [{"field":"referrer","op":"contains","value":"google"}], or filter a page with [{"field":"page","op":"eq","value":"/pricing"}]. For in / nin, pass a non-empty array value such as ["chrome","firefox"] or a pipe-delimited string such as "chrome|firefox". Array string members cannot contain a literal |, which is reserved as the Tinybird membership separator. Optional one-level nested filters use the same canonical envelope and membership rule. On the user-aggregate endpoints (lifecycle, frequency) the same array also carries profile-family entries: profile metrics (net_worth_usd, volume, revenue, points), social identity fields, a lifecycle entry ({"field":"lifecycle","op":"in","value":"New|Power user"}), and resource entries using the stable fields chains.balance, apps.balance, tokens.balance, and labels.value with named qualifier properties (chain_id, app_id, token_address, scope, tag_id). The retired per-family parameters (socials, chain_filters, app_filters, token_filters, label_filters, profile_filters, lifecycle_filter) are rejected.

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.

behavior_filters
string

JSON array filtering users by event-based behavior with counts and either an absolute date range or a window relative to the user's first event. Each entry is { event, op, times, date_from?, date_to?, event_type?, relative_to?, window? }. When relative_to: "first_seen" is set, the matching events must occur within window.value window.unit (hour | day) after the user's first event; date_from/date_to are ignored. event_type narrows matching to a specific event-type column (page, connect, disconnect, chain, signature, transaction, track, decoded_log, detect, identify); for track and decoded_log the event field is the named identifier; for other types only the type column is matched.

source_filter
string

JSON array filtering users by raw event source. Entries use the canonical envelope and field must be source. Distinct from channel_filter, which matches the classified acquisition channel.

channel_filter
string

JSON array filtering users by classified acquisition channel. Entries use the canonical envelope and field must be channel_type. Distinct from source_filter, which matches the raw SDK source.

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