APIs & Integrations

Not applicable

Email Events not returned for particular campaign

When using the endpoint https://api.hubapi.com/email/public/v1/campaigns/[campaignId] a particular campaign returns details with the counters array listing this campaign has a certain amount of processed, sent, etc.

When using this same campaignid with the endpoint https://api.hubapi.com/email/public/v1/events?campaignId=[campaignId] no email events are returned.

The email events exist, I can find them in the application, why wouldn’t the API return these events?

0 Upvotes
5 Replies 5
Dadams
HubSpot Employee
HubSpot Employee

Email Events not returned for particular campaign

Hi @Damien_O_Dea

Are you including the appId= that is associated with that campaignId? You’ll need to include both parameters together if you’re getting data from a campaign.

Otherwise, are you getting an empty list in the "events" data, or some type of error?

0 Upvotes
Not applicable

Email Events not returned for particular campaign

Hi @dadams

I am including the appId parameter, and am just getting an empty list in the events data.

E.g.
{“hasMore”:false,“offset”:“CgoY__________9_”,“events”:[]}

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Email Events not returned for particular campaign

@Damien_O_Dea can you message me directly with the Hub ID and campaignId you’re seeing this with?

0 Upvotes
Not applicable

Email Events not returned for particular campaign

Hi @dadams

Our hubspot ID is 270076.

A sample email campaign ID is 32078089.

Without the hapikey parameter, the bellow two calls will show whats happening.

This API call lists details regarding email events that happened in the counters (which can also be found in the application):
https://api.hubapi.com/email/public/v1/campaigns/32078089?appId=22843&hapikey=

This call however returns no email events:
https://api.hubapi.com/email/public/v1/events?campaignId=32078089&appId=22843&hapikey=

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Email Events not returned for particular campaign

That appId doesn’t look correct, the correct ID for that campaign should be 2286, so if you use that appId you should get the events:

https://api.hubapi.com/email/public/v1/events?campaignId=32078089&appId=2286&hapikey=
0 Upvotes