Basic

Get aggregated statistic intervals

Changed on

Get aggregated statistics in intervals for a specified time span. Each interval contains aggregated statistics of the emails that were sent in that time.

get/marketing/emails/2026-03/statistics/histogram

Request

  • Base URL
    https://api.hubapi.com
  • Auth
    • OAuth 2
      Authorization codehttps://app.hubspot.com/oauth/authorize
      Token URLhttps://api.hubapi.com/oauth/v1/token
      Scopesmarketing.email.read
    • or OAuth 2
      Authorization codehttps://app.hubspot.com/oauth/authorize
      Token URLhttps://api.hubapi.com/oauth/v1/token
      Scopesmarketing.email.write
    • or OAuth 2
      Authorization codehttps://app.hubspot.com/oauth/authorize
      Token URLhttps://api.hubapi.com/oauth/v1/token
      Scopesmarketplace_validation
    • or OAuth 2
      Authorization codehttps://app.hubspot.com/oauth/authorize
      Token URLhttps://api.hubapi.com/oauth/v1/token
      Scopescontent

Query parameters

emailIdsinteger[]

A list of email IDs to filter the statistics. This is a form-style parameter that can include multiple IDs.

endTimestampstring date-time

The end timestamp for the statistics data range. Must be in date-time format.

interval'DAY' | 'HOUR' | 'MINUTE' | 'MONTH' | 'QUARTER' | 'QUARTER_HOUR' | 'SECOND' | 'WEEK' | 'YEAR'

The time interval for the histogram. Valid values are YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, QUARTER_HOUR, MINUTE, and SECOND.

startTimestampstring date-time

The start timestamp for the statistics data range. Must be in date-time format.

Response

successful operation

totalinteger required

An integer representing the total number of email statistic intervals available.

Changes

  • 2026-03a2b5d0cf80abRevision changes
    • info

      the security scope marketing.email.read was added to the endpoint's security scheme oauth2

    • info

      the security scope content was removed from the endpoint's security scheme oauth2

  • 2026-03deba4fb9e606Revision changes
    • info

      the security scope marketing.email.read was added to the endpoint's security scheme oauth2

    1 more change in this revision