Stats API

Fetch Summary Stats

Changed on

This API tracks key events—such as opens, clicks, and unsubscribes— and generates performance statistics, updated hourly based on your profile’s timezone. You can view this data in your Email API dashboard or retrieve it programmatically via this API. Retention Policy: - Monthly stats are retained for the lifetime of the domain. - Event-level data is retained for 90 days.

get/stats

Request

  • Base URL
    https://emailapi.netcorecloud.net/v6
  • URL
    https://emailapi.netcorecloud.net/v6/stats
  • Auth
    HTTP bearer

Query parameters

start_datestring
Example:2023-10-01

The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD.

end_datestring
Example:2023-10-10

The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD.

aggregated_by'day' | 'week' | 'month' | 'tag' | 'fromdomain' | 'recipientdomain' | 'fromaddress' | 'subaccount'

How to group the statistics. Must be one of: day, week, month, tag, fromdomain, recipientdomain, fromaddress, subaccount.

Headers

on-behalf-ofstring

When a master account API key is used you can fetch the summary stats of the subaccount by providing subaccount username.

Response

OK

Example response

{
  "data": [
    {
      "date": "string",
      "stats": [
        {
          "metrics": {
            "bounce": 0,
            "click": 0,
            "dropped": 0,
            "invalid": 0,
            "open": 0,
            "sent": 0,
            "spam": 0,
            "unique_click": 0,
            "unique_open": 0,
            "unsub": 0,
            "processed": 0
          }
        }
      ]
    }
  ]
}

Changes

    • breaking

      for the query request parameter aggregated_by, default value day was added

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • breaking

      the ///// response's property type changed from string to number for status

    • warning

      deleted the header request parameter api_key

    • warning

      deleted the query request parameter enddate

    • warning

      deleted the query request parameter limit

    • warning

      deleted the query request parameter offset

    • warning

      deleted the query request parameter startdate

    • warning

      removed the optional property from the response with the status

    • info

      api operation id GET_stats removed and replaced with get-stats

    • info

      the endpoint scheme security bearer was added to the API

    • info

      api tag Stats API added

    • info

      api tag Events API removed

    • info

      added the new optional header request parameter on-behalf-of

    • info

      added the new optional query request parameter end_date

    • info

      added the new optional query request parameter start_date

    • info

      added the new enum value fromaddress to the query request parameter aggregated_by

    • info

      added the new enum value fromdomain to the query request parameter aggregated_by

    • info

      added the new enum value recipientdomain to the query request parameter aggregated_by

    • info

      added the new enum value subaccount to the query request parameter aggregated_by

    • info

      added the new enum value tag to the query request parameter aggregated_by

    • info

      removed the non-success response with the status

    • info

      removed the non-success response with the status

    • info

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