<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Marketing emails api endpoint in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155627#M82234</link>
    <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943128"&gt;@LF_Ruiz&lt;/a&gt;&lt;/SPAN&gt; and welcome, we are so glad to see you here! &lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Great question, thanks for asking the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;For information, here is the "&lt;A href="https://developers.hubspot.com/docs/guides/api/marketing/emails/marketing-emails" target="_blank"&gt;Marketing Email API&lt;/A&gt;" documentation.&lt;BR /&gt;&lt;BR /&gt;I found for you the solution from &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/171963"&gt;@Bortami&lt;/a&gt;&lt;/SPAN&gt; on this post "&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Get-marketing-e-mails-per-Contact/m-p/1059527" target="_blank"&gt;Get marketing e-mails per Contact&lt;/A&gt;" that might be of interest.&lt;BR /&gt;&lt;BR /&gt;I'd love to put you in touch with our Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/171963"&gt;@Bortami&lt;/a&gt;&lt;/SPAN&gt;, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&lt;/SPAN&gt; do you have suggestions to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943128"&gt;@LF_Ruiz&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;Have a great day and thanks so much in advance for your help! &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
    <pubDate>Thu, 22 May 2025 10:02:33 GMT</pubDate>
    <dc:creator>BérangèreL</dc:creator>
    <dc:date>2025-05-22T10:02:33Z</dc:date>
    <item>
      <title>Marketing emails api endpoint</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155473#M82216</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are working with python and HubSpot API, using both the hubspot api library for python and the requests library depending on the endpoint we are using.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have found a roadblock trying to retrieve the&amp;nbsp;marketing emails&amp;nbsp;and tie them to a contact and get the exact action that contact took with the email (either open, click, bounce, etc).Does anyone know if this is possible and if it is, how can make the call/calls?&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 21:02:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155473#M82216</guid>
      <dc:creator>LF_Ruiz</dc:creator>
      <dc:date>2025-05-21T21:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Marketing emails api endpoint</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155627#M82234</link>
      <description>&lt;P&gt;Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943128"&gt;@LF_Ruiz&lt;/a&gt;&lt;/SPAN&gt; and welcome, we are so glad to see you here! &lt;span class="lia-unicode-emoji" title=":hugging_face:"&gt;🤗&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Great question, thanks for asking the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;For information, here is the "&lt;A href="https://developers.hubspot.com/docs/guides/api/marketing/emails/marketing-emails" target="_blank"&gt;Marketing Email API&lt;/A&gt;" documentation.&lt;BR /&gt;&lt;BR /&gt;I found for you the solution from &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/171963"&gt;@Bortami&lt;/a&gt;&lt;/SPAN&gt; on this post "&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Get-marketing-e-mails-per-Contact/m-p/1059527" target="_blank"&gt;Get marketing e-mails per Contact&lt;/A&gt;" that might be of interest.&lt;BR /&gt;&lt;BR /&gt;I'd love to put you in touch with our Top Experts: Hi &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/171963"&gt;@Bortami&lt;/a&gt;&lt;/SPAN&gt;, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&lt;/SPAN&gt; and &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&lt;/SPAN&gt; do you have suggestions to help &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943128"&gt;@LF_Ruiz&lt;/a&gt;&lt;/SPAN&gt;, please?&lt;BR /&gt;&lt;BR /&gt;Have a great day and thanks so much in advance for your help! &lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 10:02:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155627#M82234</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-05-22T10:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Marketing emails api endpoint</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155634#M82235</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should start there and see if you find a starting point to create your code (list the events and look for clicks and email opens, then use the Email Marketing API and Contacts API to refine the data you need):&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/reference/api/analytics-and-events/event-analytics" target="_blank"&gt;https://developers.hubspot.com/docs/reference/api/analytics-and-events/event-analytics&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 10:30:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155634#M82235</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-05-22T10:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: Marketing emails api endpoint</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155649#M82237</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943128"&gt;@LF_Ruiz&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Yes, this is possible using HubSpot APIs. You’ll need to combine two APIs to achieve this:&lt;BR /&gt;&lt;BR /&gt;Step 1&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Use the &lt;STRONG&gt;Email Events API&lt;/STRONG&gt; (Legacy) to find out what actions a contact took on marketing emails (e.g., opened, clicked, bounced).&lt;/P&gt;&lt;P&gt;You’ll need the contact’s email address.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import requests

TOKEN = 'your_private_app_token'
headers = {
    'Authorization': f'Bearer {TOKEN}',
    'Content-Type': 'application/json'
}

params = {
    'recipient': 'contact@example.com',
    'limit': 100
}

response = requests.get(
    'https://api.hubapi.com/email/public/v1/events',
    headers=headers,
    params=params
)

for event in response.json().get('events', []):
    print(event['type'], event['emailCampaignId'], event['timestamp'])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will return event types like:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open&lt;/LI&gt;&lt;LI&gt;Click&lt;/LI&gt;&lt;LI&gt;Bounce&lt;/LI&gt;&lt;LI&gt;Unsubscribe&lt;BR /&gt;&lt;BR /&gt;Step 2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Once you have the emailCampaign id from the events, use the &lt;STRONG&gt;Marketing Emails API v3&lt;/STRONG&gt; to get info about the email (like subject line and send time):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;email_id = '123456'  # use emailCampaignId from above
response = requests.get(
    f'https://api.hubapi.com/marketing/v3/emails/{email_id}',
    headers=headers
)

email_data = response.json()
print(email_data['subject'], email_data['publishDate'])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps...&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 10:58:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1155649#M82237</guid>
      <dc:creator>Balaji_Mavlers1</dc:creator>
      <dc:date>2025-05-22T10:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Marketing emails api endpoint</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1162694#M82513</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/601366"&gt;@sylvain_tirreau&lt;/a&gt;&amp;nbsp;and &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/754021"&gt;@Balaji_Mavlers1&lt;/a&gt;! Thanks for your answer! I'm testing it and I have one question that maybe you can solved, How should I write the request to get me all the events related to an specific campaign?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I already have the campaign ids, base on a list of campaigns ids (using a for loop for example) I would like to get all the events related to it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The goal with this is not to query all the events everyday, but just to get the campaigns I'm interested in.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 14:52:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1162694#M82513</guid>
      <dc:creator>LF_Ruiz</dc:creator>
      <dc:date>2025-06-11T14:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Marketing emails api endpoint</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1163454#M82563</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/943128"&gt;@LF_Ruiz&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try something like that:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://api.hubapi.com/events/v3/events?objectType=CAMPAIGN&amp;amp;objectId=12345&amp;amp;limit=100" target="_blank"&gt;https://api.hubapi.com/events/v3/events?objectType=CAMPAIGN&amp;amp;objectId=12345&amp;amp;limit=100&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The response contains a paging.offset field to paginate; return it in your next call via &amp;amp;offset={offset}&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 15:06:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Marketing-emails-api-endpoint/m-p/1163454#M82563</guid>
      <dc:creator>sylvain_tirreau</dc:creator>
      <dc:date>2025-06-11T15:06:17Z</dc:date>
    </item>
  </channel>
</rss>

