<?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: Inconsistency between API and UI regarding email subscription status in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1170155#M82910</link>
    <description>&lt;P&gt;I can share the solution which I developed that aligns with your recommendation. For other developers out there: if you want to check if the `SUBSCRIBED` is really valid, you should check the other field of the status called `legalBasis`. If it's `null` this means that the value returned as the status name is the default `SUBSCRIBED`.&lt;BR /&gt;&lt;BR /&gt;In form of a snipped:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const isReallySubscribed  = status.name === "SUBSCRIBED" &amp;amp;&amp;amp; status.legalBasis !== null;&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 27 Jun 2025 07:21:58 GMT</pubDate>
    <dc:creator>GGodlewski</dc:creator>
    <dc:date>2025-06-27T07:21:58Z</dc:date>
    <item>
      <title>Inconsistency between API and UI regarding email subscription status</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1164296#M82611</link>
      <description>&lt;P&gt;Hello there!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I recently discovered an inconsistency between what the Contacts UI says about the email subscriptions for my contacts vs the information returned from the API. I think this was working fine some time ago and then went broken.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Steps to reproduce:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- I create a contact via the API&lt;/P&gt;&lt;P&gt;- I check the contact in HubSpot UI, looking at "Communication Subscriptions", when clicking for the details I see that for all of my subscriptions the UI says "Not Specified".&lt;/P&gt;&lt;P&gt;- I use the JS SDK to get the communication preferences via the status API (example below).&lt;BR /&gt;- For each of my subscriptions the API response says that the user is subscribed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Expected result:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;The information exposed in the UI and via the API is consistent and I can see via the API which of the subscriptions the user is subscribed to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pain point:&lt;/STRONG&gt;&amp;nbsp;Effectively I'm not able to programatically establish the actual subscription status.&lt;BR /&gt;&lt;BR /&gt;Snippet: Reproduction code&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;client &lt;/SPAN&gt;&lt;SPAN&gt;= &lt;/SPAN&gt;&lt;SPAN&gt;new &lt;/SPAN&gt;&lt;SPAN&gt;HubspotClient&lt;/SPAN&gt;&lt;SPAN&gt;({&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;accessToken&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;ACCESS_TOKEN&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;});&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;async function &lt;/SPAN&gt;&lt;SPAN&gt;reproduce&lt;/SPAN&gt;&lt;SPAN&gt;() {&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;const &lt;/SPAN&gt;&lt;SPAN&gt;response &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;await &lt;/SPAN&gt;&lt;SPAN&gt;client&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;communicationPreferences&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;statusApi&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getEmailStatus&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;EMAIL&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;  &lt;SPAN&gt;response&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;subscriptionStatuses&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;forEach&lt;/SPAN&gt;&lt;SPAN&gt;((&lt;/SPAN&gt;&lt;SPAN&gt;status&lt;/SPAN&gt;&lt;SPAN&gt;) =&amp;gt;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;log&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;BR /&gt;&lt;/SPAN&gt;      &lt;SPAN&gt;"- %s (%s from %s)"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;      &lt;SPAN&gt;status&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;      &lt;SPAN&gt;status&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;status&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;      &lt;SPAN&gt;status&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;sourceOfStatus&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;    ),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;  );&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;})().&lt;/SPAN&gt;&lt;SPAN&gt;catch&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;console&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;error&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;LI-CODE lang="markup"&gt;- EAP Development Updates (SUBSCRIBED from SUBSCRIPTION_STATUS)
- Marketing (SUBSCRIBED from SUBSCRIPTION_STATUS)
- Customer Service Communication (SUBSCRIBED from SUBSCRIPTION_STATUS)
- EAP Product Launches and Updates (SUBSCRIBED from SUBSCRIPTION_STATUS)
- EAP Product Research and Sruveys (SUBSCRIBED from SUBSCRIPTION_STATUS)
- Product Updates (SUBSCRIBED from SUBSCRIPTION_STATUS)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 09:13:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1164296#M82611</guid>
      <dc:creator>GGodlewski</dc:creator>
      <dc:date>2025-06-13T09:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistency between API and UI regarding email subscription status</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1170121#M82901</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/953749"&gt;@GGodlewski&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The “Not Specified” status in the UI often appears for contacts created through the API because, by default, no explicit subscription action has been taken in the UI. However, the API might return them as “SUBSCRIBED” since no opt-out is recorded.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Here’s what’s happening:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;UI: “Not Specified” means there’s no explicit record of the user subscribing or unsubscribing.&lt;/LI&gt;
&lt;LI&gt;API: If there’s no opt-out, the API often interprets the status as “SUBSCRIBED” (especially for new contacts created via API).&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;What can you do:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If you need true alignment, you’ll want to explicitly set the subscription status for each contact (either via API or UI). This way, both the UI and API will reflect the same, explicit status.&lt;/LI&gt;
&lt;LI&gt;For programmatic workflows, consider treating “SUBSCRIBED” from the API and “Not Specified” in the UI as functionally equivalent, unless you require explicit consent records for compliance purposes.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Fri, 27 Jun 2025 06:17:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1170121#M82901</guid>
      <dc:creator>GiantFocal</dc:creator>
      <dc:date>2025-06-27T06:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Inconsistency between API and UI regarding email subscription status</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1170155#M82910</link>
      <description>&lt;P&gt;I can share the solution which I developed that aligns with your recommendation. For other developers out there: if you want to check if the `SUBSCRIBED` is really valid, you should check the other field of the status called `legalBasis`. If it's `null` this means that the value returned as the status name is the default `SUBSCRIBED`.&lt;BR /&gt;&lt;BR /&gt;In form of a snipped:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const isReallySubscribed  = status.name === "SUBSCRIBED" &amp;amp;&amp;amp; status.legalBasis !== null;&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 27 Jun 2025 07:21:58 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Inconsistency-between-API-and-UI-regarding-email-subscription/m-p/1170155#M82910</guid>
      <dc:creator>GGodlewski</dc:creator>
      <dc:date>2025-06-27T07:21:58Z</dc:date>
    </item>
  </channel>
</rss>

