APIs & Integrations

hurree
Member

Email Campaign endpoint is not returning campaigne

Hi

I have 2 email campaign.
First one with an id 92506221 that has open rade grather then 0
and second one 93598677 that has open rate equals to 0.
For the first one I can use endpoint to check who has opened an email
https://api.hubapi.com/email/public/v1/events?campaignId=92506221&eventType=OPEN
and i can check details for this campaigne
https://api.hubapi.com/email/public/v1/campaigns/92506221

but for the second one when I'm trying to get an information who has opened an email
https://api.hubapi.com/email/public/v1/events?campaignId=93598677&eventType=OPEN
I'm receiving en 400 Bad Request error with a message
"query params 'appId' and 'emailCampaignId' must be specified together"
ok so I have tried to get this id from a campaigne details as I can for the first one
https://api.hubapi.com/email/public/v1/campaigns/93598677
but I'm receiving 404 Not Found with a message
"Unknown email campaign id: 93598677"

This is not true. I see this campaigne on my list.

0 Upvotes
5 Replies 5
hurree
Member

Email Campaign endpoint is not returning campaigne

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Email Campaign endpoint is not returning campaigne

Hey @hurree,

 

Thanks for providing this URL - I was able to check on the Campaigns associated to your Portal and cannot find a Campaign by the Id of 93598677. 


You can find all the Campaigns in your Portal by using our Get all campaigns by Id endpoint, this will then provide you with the Id's you can use in your queries. 


I hope this helps!

Product Manager @ HubSpot
0 Upvotes
RBsais
Member

Email Campaign endpoint is not returning campaigne

Hi,

i am using this API https://legacydocs.hubspot.com/docs/methods/email/get_campaigns_by_id

but i still get this error Unknown email campaign id

please can you help me??

0 Upvotes
Willson
HubSpot Employee
HubSpot Employee

Email Campaign endpoint is not returning campaigne

Hey @hurree,

 

In order to assist here, would you be able to link to the Portal where these sends are located? 

 

From there, we can take a look to find the specific campaign_id to reference in order to make these requests going forward. 

 

Thanks!

Product Manager @ HubSpot
0 Upvotes
hurree
Member

Email Campaign endpoint is not returning campaigne

0 Upvotes