APIs & Integrations

Not applicable

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

SOLVE

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.

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

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

SOLVE

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.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

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

SOLVE

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.

Isaac Takushi

Associate Certification Manager
0 Upvotes