Email endpoint returns data for some recipients, but not others
I have a list of recipients for a particular campaign. I believe all of them have at least received one email.
Using python and the email events endpoint, I am testing retrieving email event data for the recipients as follows:
Python code:
#...various import statements...
url='https://api.hubapi.com/contacts/v1/contact/email/[recipient email 123]/profile?hapikey=[my api key]'
f = urllib.request.urlopen(url2)
print(f.read().decode('utf-8'))
I am finding that although both [recipient email 123] and [recipient email 456] are in the same campaign recipient list, email recipient will return data while recipient 456 will not. Any clue why that would be? As a new hubspot user, I would expect that qualifying only on the recipient email would return data across all the campaigns that have touched them.
My ultimate goal is to return the list of recipients from the email endpoint by qualifying on the campaignid parameter, but until I can solve the above I won't feel confident that I'm catching all the campaign recipients.
Email endpoint returns data for some recipients, but not others
Hi @ouonomos, it appears you can't make this request for emails with a + character in them. URL encoding doesn't seem to work either. I'm going to reach out to see if this is expected but I do believe it is. Further, make sure to make your requests to the the secure URL rather than http, though that shouldn't have had a bearing on what you saw with the first example you wrote above.
Email endpoint returns data for some recipients, but not others
Apologies -- you're right; I'd copied that email address into the wrong URL example
However, I still don't return anything when using the email endpoints URL: url3='http://api.hubapi.com/email/public/v1/events?hapikey=[myapikey]&recipient=nwnippy27+cb1@gmail.com'