v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Analytics

Get analytics chart data

Returns time-series data for a chart. chart_code selects the metric; pass query parameters to constrain the time range and segmentation.

Public chart codes (25 total) — see enum for the full machine-readable list:

  • Revenue: proceeds (net), sales (gross), refunds, refund-rate, arpu, arppu.
  • Recurring revenue: mrr, arr, mrr-movement, arr-movement (new / expansion / contraction / churn).
  • Subscriptions: active-subscriptions, new-subscriptions, paid-subscriptions-movement, subscriptions-overview, subscription-cancellation.
  • Trials: free-trials, active-trials, trials-movement, trial-cancellation, trial-to-paid.
  • Acquisition / conversion: users-overview, user-to-trial, user-to-paid.
  • Back-compat aliases (factory maps to canonical executor): user-to-trial-conversion = user-to-trial, subscription-cancellation-rate = subscription-cancellation.

Codes deferred to v4 api 2.0 (currently return 404): cohort-revenue, cohort-active-subscriptions, experiment-new-users, experiment-users-to-trials, experiment-users-to-paid, refund-keeper, events.

Segmentation codes (pass via segmentation) and filter attribute codes (pass via filter[<attribute>][]) are discoverable from GET /v4/analytics/charts/{chart_code}/meta.

get/analytics/charts/{chart_code}

Path parameters

chart_code'proceeds' | 'active-subscriptions' | 'paid-subscriptions-movement' | 'users-overview' | 'free-trials' | 'active-trials' | 'trials-movement' | 'user-to-trial' | 'trial-to-paid' | 'user-to-paid' | 'sales' | 'refunds' | 'refund-rate' | 'arppu' | 'arpu' | 'trial-cancellation' | 'subscription-cancellation' | 'subscriptions-overview' | 'new-subscriptions' | 'mrr' | 'arr' | 'mrr-movement' | 'arr-movement' | 'user-to-trial-conversion' | 'subscription-cancellation-rate' required

Chart code. Only the codes listed in the endpoint description are exposed publicly; others return 404.

Query parameters

frominteger

Start of the time range (Unix timestamp, seconds). Default is 7 days before to.

tointeger

End of the time range (Unix timestamp, seconds). Default is the current time.

unit'hour' | 'day' | 'week' | 'month'

Time bucket size. hour requires a short range; month is used for long-range trends.

environment0 | 1

Environment: 0 = sandbox, 1 = production.

max_seriesinteger

Upper bound on the number of segmentation series returned. Clamped to 0..500 on the upstream.

segmentationstring

Attribute to split the chart into segments (e.g. country, target_platform, product_id). Not all charts support every segmentation — see */meta.

currencystring

Three-letter ISO 4217 currency code for monetary charts. Defaults to USD. The list of supported codes is GET /v4/analytics/currencies.

filter[<attribute>][]string[]

Attribute-scoped filter (repeat the parameter once per value). Each attribute is ANDed with every other attribute; values within the same attribute are ORed.

Examples:

  • filter[country][]=US&filter[country][]=GB — US or UK
  • filter[country][]=US&filter[target_platform][]=iOS — US and iOS
  • filter[product_id][]=premium_monthly&filter[product_id][]=premium_yearly

Attribute codes are stable across projects; their value lists are project-scoped and discoverable from the chart's */meta response (filter_conditions[].attribute / filter_conditions[].values[]). Common attribute codes:

GroupAttribute codes
Product / storetarget_platform, country, product_id, purchase_currency
Devicelocale, model, os_version, app_version, sdk_version, device_id
Customer / IDuser_id, q_user_id
Attributionmedia_source_name, campaign_name, ad_set_name, ad_name
Experimentexperiment_uid, experiment_group_uid
Screen (chart-specific)screen_uid

Scalar attributes (user_id, q_user_id, device_id) accept a single value; list attributes accept many. Up to 50 distinct attributes and 100 values per attribute are accepted; the rest are silently dropped.

Response

Chart data.

object'analytics_chart' required
urlstring required

Canonical URL for this chart query.

codestring required

Chart code, echoed from the request.

frominteger required
tointeger required
unit'hour' | 'day' | 'week' | 'month' required
environment0 | 1 required
currencystring

ISO 4217 currency code used for monetary values.

measure'usd' | 'count' | 'percent' required

Physical unit of series[].data[].value.

totalType'sum' | 'wavg' required

How series[].total is computed.

seriesRelation'partsOfWhole' | 'independent' required
  • partsOfWhole — series add up to a meaningful total (e.g. revenue by country).
  • independent — series are not directly comparable in sum.
maxSeriesinteger required

Max number of series the server may emit.

horizontalLabelTypestring

Hint for the UI on how to format X-axis labels.

segmentationstring nullable

Segmentation dimension used, if any.