Online
Bento

Stats

Stats endpoints return account, segment, report, and attribution metrics for backend dashboards and internal reporting tools.

Available Endpoints

The Stats Model

The stats model returns subscriber totals. The same keys are returned whether you query the entire account or an individual segment.

Properties

  • Name
    user_countinteger
    Description

    Total count of users in the account or segment.

  • Name
    subscriber_countinteger
    Description

    Active user count for the account or segment.

  • Name
    unsubscriber_countinteger
    Description

    Number of subscribers that have unsubscribed in the account or segment.


GET/v1/stats/site

Get Site Stats

Returns user, subscriber, and unsubscribed counts for a site.

Required Attributes

  • Name
    site_uuidstring
    Description

    The UUID of the site to get stats for.



Response

Returns site statistics including user, subscriber, and unsubscribed counts.

  • Name
    user_countinteger
    Description

    Total users on the site.

  • Name
    subscriber_countinteger
    Description

    Active subscribers on the site.

  • Name
    unsubscriber_countinteger
    Description

    Unsubscribed users on the site.


GET/v1/stats/segment

Get Segment Stats

Returns user, subscriber, and unsubscribed counts for a segment.

Required Attributes

  • Name
    site_uuidstring
    Description

    The UUID of the site to get stats for.

  • Name
    segment_idstring
    Description

    The id of the segment to get stats for.



Response

Returns segment statistics including user, subscriber, and unsubscribed counts.

  • Name
    user_countinteger
    Description

    Total users in the segment.

  • Name
    subscriber_countinteger
    Description

    Active subscribers in the segment.

  • Name
    unsubscriber_countinteger
    Description

    Unsubscribed users in the segment.


GET/v1/stats/report

Get Report Stats

Returns an object containing data for a specific report.

Required Attributes

  • Name
    site_uuidstring
    Description

    The UUID of the site to get stats for.

  • Name
    report_idstring
    Description

    The id of the report to get stats for.



Response

Returns a data blob containing the report statistics.

  • Name
    dataobject
    Description

    Report-specific statistics. Shape depends on the selected report.

  • Name
    report_idstring
    Description

    Report id used for the lookup when returned.


GET/v1/stats/ads

Get Ads Stats

Returns attribution stats for signups, customers, and revenue. Use it for questions like "how many people came from YouTube last week?", "how much did we earn from Meta last month?", or "how is the summer_2015 campaign doing?"

Required Attributes

  • Name
    site_uuidstring
    Description

    The UUID of the site to get stats for.

Optional Attributes

  • Name
    dimensionstring
    Description

    The attribution dimension to report on. Accepted values are source, campaign, medium, content, and ad. Defaults to source.

  • Name
    valuestring
    Description

    An exact dimension value to filter to, such as youtube, google, meta, or summer_2015. Leave it blank to return the top values for the selected dimension.

  • Name
    start_datestring
    Description

    The start of the reporting window. Natural language is accepted, such as today, yesterday, 3 days ago, last week, or last month.

  • Name
    end_datestring
    Description

    The end of the reporting window. Defaults to now.

  • Name
    revenue_modestring
    Description

    Which revenue events to include. Accepted values are all_revenue, first_revenue, and subscriptions. Defaults to all_revenue.



Response

Returns the selected dimension, attribution settings, totals, chart data, and a ranked breakdown. Money values are returned in cents.

  • Name
    dimensionstring
    Description

    Attribution dimension used for grouping.

  • Name
    totalsobject
    Description

    Aggregate signup, customer, and revenue totals.

  • Name
    chartarray
    Description

    Time-series values for the selected window.

  • Name
    breakdownarray
    Description

    Ranked rows for the selected attribution dimension.