APIs & Integrations

IP8
Participant

Subscription API always returns SUBSCRIBED

When I send API request to /communication-preferences/v3/status/email/{emailAddress} i always get status SUBSCRIBED for any email even for non-existing ones. In Hubspot subscription status for the contact is "Not Specified"

6 Replies 6
arshohag_onyx
Participant

Subscription API always returns SUBSCRIBED

0 Upvotes
TimWat
Member

Subscription API always returns SUBSCRIBED

I'm also experiencing this but haven't checked prod yet. Beleive it's related to this post

https://community.hubspot.com/t5/APIs-Integrations/Marketing-API-always-returns-a-subscription-for-r...

Example response is

HTTP 200

{
"recipient": "xx@xx.xx",
"subscriptionStatuses": [
{
"id": "25161xxx",
"name": "Marketing Information",
"description": "Marketing offers and updates.",
"status": "SUBSCRIBED",
"sourceOfStatus": "SUBSCRIPTION_STATUS",
"brandId": null,
"preferenceGroupName": null,
"legalBasis": null,
"legalBasisExplanation": null
}
]
}
dennisedson
HubSpot Product Team
HubSpot Product Team

Subscription API always returns SUBSCRIBED

@IP8 

Could you post an example response?

0 Upvotes
msencenb_wiq
Participant

Subscription API always returns SUBSCRIBED

I'm seeing the same behavior. After I create a brand new contact in hubspot, I hit this endpoint: /communication-preferences/v3/status/email/:email and it will return the subscription lists. Example response for a new contact:

 

{
  "id"=>"7157548",
  "name"=>"One to One",
  "description"=>"One to One emails",
  "status"=>"SUBSCRIBED",
  "sourceOfStatus"=>"SUBSCRIPTION_STATUS",
  "brandId"=>nil,
  "preferenceGroupName"=>nil,
  "legalBasis"=>nil,
  "legalBasisExplanation"=>nil
},
{
  "id"=>"66577331",
  "name"=>"WrestlingIQ Academy",
  "description"=>"Emails related to new courses and content on the WrestlingIQ Academy",
  "status"=>"SUBSCRIBED",
  "sourceOfStatus"=>"SUBSCRIPTION_STATUS",
  "brandId"=>nil,
  "preferenceGroupName"=>nil,
  "legalBasis"=>nil,
  "legalBasisExplanation"=>nil
},
{
  "id"=>"7002156",
  "name"=>"Marketing Information",
  "description"=>"Marketing and content offers (PDF downloads, ebooks, etc)",
  "status"=>"SUBSCRIBED",
  "sourceOfStatus"=>"SUBSCRIPTION_STATUS",
  "brandId"=>nil,
  "preferenceGroupName"=>nil,
  "legalBasis"=>nil,
  "legalBasisExplanation"=>nil
},
{
  "id"=>"45072512",
  "name"=>"Product updates",
  "description"=>"Updates about new features in WrestlingIQ",
  "status"=>"SUBSCRIBED",
  "sourceOfStatus"=>"SUBSCRIPTION_STATUS",
  "brandId"=>nil,
  "preferenceGroupName"=>nil,
  "legalBasis"=>nil,
  "legalBasisExplanation"=>nil
}

 

request id: a795edee-9a7d-483b-b79a-995eedff7be4 from HS Log in private app

 

But looking at the contact record, they are all not specified:

msencenb_wiq_0-1673464315348.png

I'm trying to migrate my product update list from MailChimp, and I want to be able to explicitly subscribe people to the Product Update list if they aren't subscribed. That list is active so it doesn't seem like I can use the contact/list endpoint and need to rely on what this API returns back to me about subscription types. 

 

I'll take a look at the GDPR settings in my account, since it sounds like that might be related; however, it seems like it would be ideal if the API returned something that wasn't a bool equal to true in this case? 

0 Upvotes
msencenb_wiq
Participant

Subscription API always returns SUBSCRIBED

If I explicitly change the subscriptions with communication-preferences/v3/subscribe endpoint, it does start showing as explicitly subscribed in the Hubspot UI and in the status endpoint will return with a legalBasis, since I included that in my POST call. 

 

@dennisedson this mostly just seems like a bug in the /communication-preferences/v3/status/email/{emailAddress} endpoint. Do you have any insight as to whether that endpoint could start returning the actual status of 'NOT_SPECIFIED' if the subscription is in that state? 

0 Upvotes
Kcrik59
Member

Subscription API always returns SUBSCRIBED

Hello,
I am getting exact same problem, with a slight variation. When I create a new user, via the hubspot NodeJS client, it automatically subscribs them to all the Subsciptions.

But there's a weird behavior...on Hubspot UI, the user isn't seen as subscribed to anything, but when I use the Hubspot NodeJS client, and pull the communcation preferences, it shows the user as subscribed to all of them.
Example of response:

recipient: 'chris.dan@gmail.com',
  subscriptionStatuses: [
    PublicSubscriptionStatus {
      id: '120062042',
      name: 'One to One',
      description: 'One to One emails',
      status: 'SUBSCRIBED',
      sourceOfStatus: 'SUBSCRIPTION_STATUS',
      brandId: null,
      preferenceGroupName: null,
      legalBasis: null,
      legalBasisExplanation: null
    },
    PublicSubscriptionStatus {
      id: '119871679',
      name: 'Marketing',
      description: 'Marketing insights, updates and offers.',
      status: 'SUBSCRIBED',
      sourceOfStatus: 'SUBSCRIPTION_STATUS',
      brandId: null,
      preferenceGroupName: null,
      legalBasis: null,
      legalBasisExplanation: null
    },
  ]

0 Upvotes