Campaigns V2

Campaign Overview Stats

Changed on

Returns per-campaign overview stats (users, conversions, conversion rate, proceeds) for the campaigns list cards, served from a shared edge-cached snapshot with stale-while-revalidate. The window is either a fixed date_preset (cached on the preset identity) or an explicit from/to pair, which must be supplied together and takes precedence over date_preset; a custom window is echoed back as from/to while retaining the ignored fallback date_preset for wire compatibility. Requires campaigns:read scope.

get/v2/campaigns/overview-stats

Request

  • Base URL
    https://api.superwall.com
  • URL
    https://api.superwall.com/v2/campaigns/overview-stats
  • Auth
    • HTTP bearer
    • or API key in cookie accounts_superwall_token
    • or HTTP bearer

Query parameters

application_idstring required
date_preset'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date'

Preset date range for included campaign sort metrics

fromstring

Custom window start datetime; requires to and overrides date_preset

tostring

Custom window end datetime; requires from and overrides date_preset

environment'PRODUCTION' | 'SANDBOX'
refresh'true' | 'false'

Bypass the cached snapshot and force a fresh computation

Response

Success

object'campaign_overview_stats' required
environment'PRODUCTION' | 'SANDBOX' required

Environment the stats were computed for

date_preset'last_24_hours' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days' | 'last_180_days' | 'last_365_days' | 'year_to_date' required

Requested date preset (ignored when from/to select a custom window)

fromstring

Resolved window start, echoed for custom windows

tostring

Resolved window end, echoed for custom windows

computed_atnumber required

Epoch milliseconds when the returned snapshot was produced

revalidatingboolean

True when the returned snapshot is stale and the server is recomputing it in the background; a later request returns the refreshed snapshot.

dataobject required

Overview stats keyed by campaign ID

Changes

    • warning

      added the new credentials_missing enum value to the / response property for the response status

    • warning

      added the new credentials_missing enum value to the / response property for the response status

    • warning

      added the new credentials_missing enum value to the / response property for the response status

    • warning

      added the new credentials_missing enum value to the / response property for the response status

    • warning

      added the new credentials_missing enum value to the / response property for the response status

    • info

      added subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 to the response body anyOf list for the response status

    • info

      removed subschema #1 subschema #2 subschema #3 subschema #4 subschema #5 from the response body anyOf list for the response status

    • info

      added the optional property to the response with the status