Accessing Email Open Count for Last 30 Days via API

Need Help: Accessing Email Open Count for Last 30 Days via API

What I’m Trying to Do: Build a custom workflow action that returns the exact number of email opens for a contact in the last 30 days. This data will populate a custom CRM card that shows sales reps how an MQL achieved their lead score. The sales team doesn’t look through activity timelines or general reports - they need this information displayed concisely in the contact record. I plan to expand this to other lead scoring properties like page views in last 30 days.

The Problem: I can see individual email opens with dates in the HubSpot UI (contact timeline), but cannot access this granular data through the APIs.

What I’ve Tried:

  1. CRM Contacts API - Only returns marketing_emails_opened (lifetime total) and hs_email_last_open_date (single date)
  2. Marketing Email Events API - Returns 400 errors: “Unable to infer object type from: email_events”
  3. Communications Object - Returns 0 results despite having email data
  4. Reporting API - 404 errors when trying to access email metrics

Current Setup:

  • Private app with crm.objects.contacts.read/write scopes
  • Standard Marketing Hub account
  • Node.js with @hubspot/api-client

What I Have vs What I Need:

  • Available: hs_email_last_open_date: “2025-05-04T17:05:55.893Z”
  • Need: Count of opens within 30 days from today

Questions:

  1. Is there an API endpoint for granular email event data (individual opens with timestamps)?
  2. Do I need different scopes or a higher-tier HubSpot plan?
  3. Is the Timeline Events API the right approach? Where’s the documentation?
  4. Any alternative approaches to get email engagement data programmatically?

The data exists in HubSpot’s UI but seems inaccessible via standard APIs. Any guidance on the correct approach would be appreciated.


Hey, @MBeauclair :waving_hand: This one sounds like an interesting challenge. The Reporting API may offer some of what you’re looking for. You can find the details here. You may also want to check out the Email Events API. As far as scopes, it will vary by endpoint. Once you see what scopes are needed for a specific request, you can find the subscription required here. If you want to share an example request or two that is returning an error, you can do that from Postman pretty quickly. That may give our community members more information to work with.

Best,

Jaycee