APIs & Integrations

mclayton
Participant

using Ids from API to find records in Browser

SOLVE

I'm using the API to get campaign/event information:

/email/public/v1/campaigns?hapikey=xxxxx

The IDs returned, can I use them to view the campaign in the browser, by just popping in the ID, into the URL?

 

I tried this without success.

This would help me crossreference.

0 Upvotes
1 Accepted solution
lscanlan
Solution
HubSpot Alumni
HubSpot Alumni

using Ids from API to find records in Browser

SOLVE

Hi @mclayton,

 

If I'm understanding correctly, I think what you're actually looking for are the "contentId"s. When you make a request to /email/public/v1/campaigns (documented here: https://developers.hubspot.com/docs/methods/email/get_campaigns), you'll get the campaign IDs. You can then make a request with the campaign ID to /email/public/v1/campaigns/:campaign_id (documented here: https://developers.hubspot.com/docs/methods/email/get_campaign_data). Take a look at the note in that documentation:

 

If you're viewing the details for an email in HubSpot, the Internal HubSpot ID(s) would be the campaign_id(s) for the email. Since each campaign represents a specific send of an email, it's possible for a single email to have multiple Internal IDs/campaign_ids.

 

So when you get the campaign data for a given campaign, you'll be returned the contentId. That's the ID you'll see in the URL. So for example: https://app.hubspot.com/email/:hub_id/details/:content_id/performance.

 

Let me know if that helps?

 

 - Leland

Leland Scanlan

HubSpot Developer Support

View solution in original post

0 Upvotes
2 Replies 2
lscanlan
Solution
HubSpot Alumni
HubSpot Alumni

using Ids from API to find records in Browser

SOLVE

Hi @mclayton,

 

If I'm understanding correctly, I think what you're actually looking for are the "contentId"s. When you make a request to /email/public/v1/campaigns (documented here: https://developers.hubspot.com/docs/methods/email/get_campaigns), you'll get the campaign IDs. You can then make a request with the campaign ID to /email/public/v1/campaigns/:campaign_id (documented here: https://developers.hubspot.com/docs/methods/email/get_campaign_data). Take a look at the note in that documentation:

 

If you're viewing the details for an email in HubSpot, the Internal HubSpot ID(s) would be the campaign_id(s) for the email. Since each campaign represents a specific send of an email, it's possible for a single email to have multiple Internal IDs/campaign_ids.

 

So when you get the campaign data for a given campaign, you'll be returned the contentId. That's the ID you'll see in the URL. So for example: https://app.hubspot.com/email/:hub_id/details/:content_id/performance.

 

Let me know if that helps?

 

 - Leland

Leland Scanlan

HubSpot Developer Support
0 Upvotes
mclayton
Participant

using Ids from API to find records in Browser

SOLVE

I believe this is what I want. thank you!

0 Upvotes