Charts V2

Query Chart Data

Changed on

Queries chart data from ClickHouse based on the provided parameters. Returns time series data with optional breakdowns and filters. Requires charts:read scope.

post/v2/charts/data

Request

  • Base URL
    https://api.superwall.com
  • URL
    https://api.superwall.com/v2/charts/data
  • Auth
    • HTTP bearer
    • or API key in cookie accounts_superwall_token
    • or HTTP bearer

Request body

application_idstring required
y_axisstring required

Y-axis metric to display (e.g. netProceeds, newUsers, trialConversionRate). Must be an exact metric key from GET /v2/charts/definitions — e.g. proceeds charts use netProceeds, not proceeds.

x_axisstring required

X-axis dimension (e.g. purchaseDate, installDate). Must be an exact dimension key from GET /v2/charts/definitions.

breakdownstring nullable

Optional breakdown dimension (e.g. countryCode, placement)

date_interval'auto' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year' | 'totals'

Interval for grouping data points

conversion_timeframe'd1' | 'd3' | 'd4' | 'd7' | 'd14' | 'd30' | 'd90'

Conversion attribution window

ltv_horizon180 | 365 | 730

Predicted LTV horizon in days from each subscription's first purchase: 180, 365 (default) or 730

includestring[]

Additional y-axis metrics to include in the response

paywall_idstring[]

Filter by paywall IDs

variant_idstring[]

Filter by variant IDs

experiment_idstring[]

Filter by experiment IDs

campaign_idstring[]

Filter by campaign IDs

country_codestring[]

Filter by country codes

product_idstring[]

Filter by product IDs

placementstring[]

Filter by placements

environmentstring[]

Filter by environment (SANDBOX, PRODUCTION)

storestring[]

Filter by store (APP_STORE, PLAY_STORE, STRIPE)

app_versionstring[]

Filter by app version

sdk_versionstring[]

Filter by SDK version

product_durationstring[]

Filter by product duration

billing_plan_typestring[]

Filter by App Store billing plan type (UP_FRONT, MONTHLY)

event_typestring[]

Filter by event type

sub_start_typestring[]

Filter by subscription start type

revenue_typestring[]

Filter by revenue type

auto_renew_statusstring[]

Filter by auto renew status

revenue_sourcestring[]

Filter by revenue source (Superwall, Your App)

response_typestring[]

Filter retention messaging metrics by response type (message, alternate_product, promotional_offer, none, error)

retention_message_idstring[]

Filter retention messaging metrics by retention message IDs

retention_configuration_idstring[]

Filter retention messaging metrics by retention configuration IDs

retention_campaign_idstring[]

Filter retention messages by the campaign that served the response

retention_audience_idstring[]

Filter by retention audience ID or fallback

retention_variant_idstring[]

Filter by allocated retention variant ID or fallback

retention_selection_reasonstring[]

Filter by audience_variant, campaign_paused, or no_audience selection

retention_message_group_idstring[]

Filter retention messaging metrics by retention message group IDs (expanded to member messages)

retention_configuration_group_idstring[]

Filter retention messaging metrics by retention configuration group IDs (expanded to member configurations)

retention_localestring[]

Filter retention messaging metrics by matched locale

max_data_pointsnumber

Maximum number of data points to return (default: 1000)

metric_filtersobject

Filters a metric declares itself, keyed by the filter keys its chart response lists under filters

Response

Success

object'chart_data' required

Object type, always chart_data

request_idstring required

Unique identifier for this request

enriched_dataobject required

Enriched metadata for the response

totalsobject

Each series' total over data, keyed like data[].values: what the dashboard's Total column shows

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      added the new optional request property