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 email events

Last updated May 12, 2023

GET /email/public/v1/events

Method Details

HTTP Methods:

GET

Response Format:

json

Requires Authentication?

Yes

Rate Limited?

Yes

Headers

User-Agent

Products:

Marketing

Required Scope:

content

This endpoint is used to query the event log for events matching specified parameters.

Pagination

The parameters offset and limit are used to paginate results.

The returned offset is an opaque token used internally to keep track of the position in the result set. It's not meant to be used for anything other than subsequent requests on this endpoint with the same query parameters (excluding offset itself and limit). Further, it's meant to be short-lived.

Response details

Events will be returned in reverse-chronological order.

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.
Optional parameters How to use Description
HubSpot App ID appId=X - Used in the request URL Only return events which correspond to the given HubSpot Application ID.
HubSpot Campaign ID campaignId=X - Used in the request URL Only return events from the given HubSpot Campaign ID.
Recipient email address recipient=X - Used in the request URL Only return events related to the given recipient.
Event type eventType=X - Used in the request URL Only return events of the specified type (case-sensitive). The possible types are described in the Email Events Overview.
Start timestamp startTimestamp=X - Used in the request URL Only return events which occurred at or after the given timestamp (in milliseconds since epoch).
End timestamp endTimestamp=X - Used in the request URL Only return events which occurred at or before the given timestamp (in milliseconds since epoch).
Offset offset=X - Used in the request URL An offset token returned by a previous call to this endpoint.
Limit limit=X - Used in the request URL The maximum number of events to return. If omitted, the default value of 10 is used. The maximum allowed value is 1000.
Exclude Filtered Events excludeFilteredEvents=X - Used in the request URL Only return events that have not been filtered out due to customer filtering settings. The default value is false.

Example URL:  https://api.hubapi.com/email/public/v1/events?campaignId=13054799&appId=20185

Refer to the Email Events Overview for a full description of events, including the different event types, what they represent, how they're related, and their properties.