Email Events not returned for particular campaign


#1

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?


#2

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?


#3

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”:[]}


#4

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


#5

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=


#6

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=