How to get campaign id's for email events api


#1

If I click on Productivity > Campaigns, Recapture is in the list of campaigns. When I call the email events api to get a list of all campaigns, i get this.
{“hasMore”:true,“offset”:“NTYyODk1MTA=”,“campaigns”:[{“id”:56433425,“appId”:2286,“appName”:“Workflow”},{“id”:56417765,“appId”:20100,“appName”:“WorkflowNotification”},{“id”:56355510,“appId”:2286,“appName”:“Workflow”},{“id”:56355500,“appId”:2286,“appName”:“Workflow”},{“id”:56354348,“appId”:2286,“appName”:“Workflow”},{“id”:56353721,“appId”:2286,“appName”:“Workflow”},{“id”:56350514,“appId”:2286,“appName”:“Workflow”},{“id”:56339753,“appId”:20100,“appName”:“WorkflowNotification”},{“id”:56333917,“appId”:20100,“appName”:“WorkflowNotification”},{“id”:56289510,“appId”:113,“appName”:“Batch”}]}

I’m running into road blocks with support because they just have no knowledge on how the API works. I’ve seen 2 other people post similar questions but no one answered the question. Can someone please take a look at our account and tell me how to get the campaign id and app id for the “Recapture” campaign we’ve already begun. Ultimately, I need these two pieces of information so I can call the email events api and get info back on clicks and views.


#2

Hi @irichner,

The Campaigns tool (under Productivity) is not the same as the campaigns being referenced int he email events API documentation. In the context of email events, the campaign ID is the internal HubSpot ID associated with a particular email in the Email tool. Here’s an example from my portal: