APIs & Integrations

saar1
Member

Clarifying the meaning of ContentID vs CampaignID vs AppID

Hi all,
When making the following API call:

im getting this Json:
{
“appId”: 20185,
“appName”: “AbBatch”,
“contentId”: 933742756,
“counters”: {
“delivered”: 1,
“open”: 1,
“processed”: 1,
“sent”: 1
},
“id”: 13054799,
“name”: "Test AB (Variation) ",
“numIncluded”: 1,
“numQueued”: 1,
“subType”: “VariantB”,
“subject”: “test”,
“type”: “AB”
}

Can i please understand what’s the meaning of each ID (contentID, appID, campaignID)
Is the contentID refers to the Email unique identification? Is it somehow related to the utm content?
Tnx a lot

0 Upvotes
6 Replies 6
Teresa_Gluth
Member

Clarifying the meaning of ContentID vs CampaignID vs AppID

Since email campaign is referring to the individual single send of an email, where do you find the details of the “Productivity > Campaigns” and how are email campaigns connected to them. I’m using Cdata odbc, not API calls.

0 Upvotes
saar1
Member

Clarifying the meaning of ContentID vs CampaignID vs AppID

Sorry I didn’t mention what endpoint was that, here it is:

Get campaign data for a given campaign | Email Events API

GET /email/public/v1/campaigns/:campaign_id

One more thing i’d like to understand that is a bit unclear to me:
In the Json above one of the fields i get is “id”. On your example on your docs, the number is this:13054799
What i’d like to know is, whether this is the campaign ID?
If so, then how come when i enter ‘Campaigns’ on HS (Productivity -> campaigns) and click a specific campaign, the ID i see in the URL doesn’t look anything like your example, but looks like this:

Can i please get a clarification on this?
Thanks for the help

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Clarifying the meaning of ContentID vs CampaignID vs AppID

Hi @saar1

Email campaigns returned by the Email Events API are completely separate from the campaigns you’d see in HubSpot under Productivity > Campaigns. Email campaigns are a single send of an email, while the campaigns you’d see in HubSpot are collections of content that you’re analyzing together.

For the specific IDs you’re looking for, the contentId is the id of the email content, basically what you’d be editing in HubSpot. It’s possible to have two campaigns for a single contentId if you send the same email multiple times. The appId is our internal ID for the system sending that email, and you’ll need that appId to get more details about the campaign or the events from that campaign. The id field is the ID of that specific campaign.

There are more details about the fields you’d see from the Email Events API in the overview here:

Email Events Overview | Email Events API

An overview of the Email Events API.

0 Upvotes
saar1
Member

Clarifying the meaning of ContentID vs CampaignID vs AppID

@dadams Thaks for getting back to me, I appreciate your help.

Here’s an example of the URL line (in the browser) when a user clicks and email that was sent to him:

Last Minute Travel has the best deals on flights, hotel bookings, trip packages,...

Plan your next trip with Last Minute Travel. Reserve seats on flights, read reviews, and book hotels. Find the best deals on vacation packages, cruises, and rental cars.

From my findings I can tell that the utm_content and the ‘_hsmi’ i see in the URL are both identical and refer to the ‘ID’ field i get from the ‘Get campaign data for a given campaign’ API call.
My question is, how can i know what is the emailID (contentID) on the browser URL?

Thanks for the help

0 Upvotes
saar1
Member

Clarifying the meaning of ContentID vs CampaignID vs AppID

@dadams Hi, any updates here?

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Clarifying the meaning of ContentID vs CampaignID vs AppID

The _hsmi parameter is the internal email campaign ID as you mentioned, but the email contentId is not included in the URL, so you’d need to look it up using the Email Events API and the campaign ID.

0 Upvotes