There's a new version of the HubSpot API

As of November 30, 2022, HubSpot API keys are no longer a supported authentication method for accessing HubSpot APIs. Instead, you should use a private app access token or OAuth to authenticate API calls. Learn more about this change and how to migrate an API key integration to use a private app instead.

Get the statistics for a marketing email

Last updated December 8, 2023

GET /marketing-emails/v1/emails/with-statistics/:email_id

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

content

Get the statistics for a specific marketing email. These include the same parameters returned from the 'get all marketing emails' and 'get a marketing email' endpoints, in addition to the performance related metrics described in the table below.

You can include the workflowNames=true query parameter in your request (i.e., ?workflowNames=true) to return the workflowNames property in the response, which contains an array of the names of any workflows associated with the marketing email.

If you want to retrieve email deliverability event data (e.g., delivery, engagement, status changes, etc.) for an email campaign, check out the email events API.

Please note: provide the marketingCampaignNames=true query parameter in the URL of your request to ensure that the response includes an up-to-date campaignName of your email campaign. If this parameter is omitted or set to false, any edits made to your email campaign name after it was initially created will not be reflected in the data returned from this endpoint.

Required Parameters How to use Description
OAuth access token or private app access token Authorization: Bearer {token} header Used to authenticate the request. Please see this page for more details about authentication.
 Email ID /:email_id
 Used in the request URL
The ID of the email that you want to get the details for. 

JSON Fields returned in the 'stats' field

Parameter name Type Description
sent Integer the total number of sent emails
open Integer The total number of unique opens
delivered Integer The number of emails succesfully delivered to an inbox
bounce Integer The number of times contacts were sent your email, but they didn’t receive it because either their address is invalid, your email hit their spam filter, or your email was marked as spam by other people.
unsubscribed Integer The number of contacts who received your email and unsubscribed. They won’t be sent to in the future.
click Integer The number of unique recipients who clicked on any link in your email, excluding the Unsubscribe and Subscription Preferences links.
dropped Integer The number of contacts that were not sent your email. This may be because they previously hard bounced, unsubscribed, marked you as spam, or because they have not engaged with any of your recent emails.
selected Integer  The number of contacts selected to receive this email.
spamreport Integer The number of contacts received your email and marked it as spam. They won’t be sent to in the future.
suppressed Integer The number of contacts that did not receive your email due to graymail suppression.
hardbounced Integer These contacts were sent your email, but they didn’t receive it because either their address is invalid, your email hit their spam filter, or your email was marked as spam by other people.
softbounced Integer Soft bounces occur when a contact’s inbox has a temporary problem. You can still send to these people in the future. Contacts who hard bounce will be ineligible for later sends.
pending Integer The number of emails still trying to reach a contact's inbox.
contactslost Integer The sum of contacts that have unsubscribed, marked the email as spam, or have hardbounced.
notsent Integer These contacts were not sent your email. This may be because they previously hard bounced, unsubscribed, marked you as spam, or because they have not engaged with any of your recent emails.
clickratio Integer Click rate is the percentage of people who clicked a link in your email out of the people who were delivered your email.
clickthroughratio Integer This is the percentage of people who clicked a link in your email out of the people who opened your email.
deliveredratio Integer the number of succesfull deliveries over the number of selected contacts.
openratio Integer Open rate is the percentage of people who opened your email out of the people who were delivered your email.
unsubscribedratio Integer the number of contacts that have unsubscribed over the total number of selected contacts
spamreportratio Integer The number of contacts that mark the email as spam over the total number of selected contacts.
hardbounceratio Integer The number of contacts that hard bounced from the email over the total number of selected contacts.
bounceratio Integer The number of contacts that bounced from the email over the total number of selected contacts.
softbounceratio Integer The number of contacts that soft bounced from the email over the total number of selected contacts.
contactslostratio Integer The number of contacts that can no longer recive emails from the portal over the total number of selected contacts.
pendingratio Integer The number of contacts that soft bounced from the email over the total number of selected contacts.
contactslostratio Integer The number of contacts that were selected but not sent to over the total number of selected contacts.
workflowNames Array If you included the workflowNames=true query parameter in your request, the names of any workflows associated with this email will be included in this field in the response. The default value of this query parameter is false.