Hello,
I am very new to HubSpot and I am working to retrieve some data from the system using the API. From a contact I need to get some of the info from the activities tab such as page view, form submissions and marketing emails. Using https://api.hubapi.com/events/v3/events/?objectType=contact&objectId=<objectId> i can get the page views and form submission but I don´t see the marketing email. Is there a way to retrieve this info?
Best Regards,
André
Hey @AJönsson1! Welcome to HubSpot and the Community.
I’d recommend the Marketing API to get marketing email data from contacts: Marketing API | Marketing Email - HubSpot docs
If you still can’t get what you need, feel free to post an example of a call and response you got (omit your Auth code/any contact info) and we can look at it!
Best,
Kennedy
Hello Kennedy,
Thanks for that ![]()
Yes, that might help me but the problem is I don´t know exactly how I get the IDs to work with. I would like to get all emails that is connected to a contact. And from all API calls I have tried I don´t seem to retrieve it?
Best regards,
André
Can you share an example of an API call you used and what you received versus your expectations? Are you looking to also get all sales emails from a contact?
I want to invite some subject matter experts to see if they have any suggestions.
Hey @Bortami, @MatthiasWeber, @HubSpot_Corey do you have any other recommendations for APIs to get all email activities associated with a contact?
Best,
Kennedy
Hey there!
With marketing email events, they have to be retrieved differently. Their data structure is not the same as other events in HubSpot.
What you are looking for to retrieve email marketing events by person is the https://api.hubapi.com/email/public/v1/events ?recipient={{email}} endpoint. (here’s the docs endpoints & guide).
Hello,
Thank you for the answer. I think I got it sorted now.
Thanks a lot!
Br,
André