Shall I use groupId or id as the campaign Id for my Email event api call


#1

I am using this url below to get all the campaign ids for my email campaign,

https://api.hubapi.com/email/public/v1/campaigns?hapikey=___&limit=9999

in the information returned, I found that only LocalTimeBatch data has group ID, and all of them have "id". I wonder which ID should I use to get the performance data for particular email?

OFF TOPIC questions: is there a way to pull all the historical data for all my email campaign via REST API? Any information would be very helpful.


#3

Welcome, @kai_wei_tivity!

These two related topics go into detail about the groupId:

The id is the value you use in endpoints like this to get the performance data for a particular email, however I have not experimented with the groupId. If you plug that into the endpoint, what do you receive?

Yes, you can pull all historical performance data for your email campaigns by looping through the results from this endpoint for every single campaign you get from this endpoint.