Update email subscription status for an email address is not working


#1

Hello there,

I was just trying to add a subscription for an email address using this api https://developers.hubspot.com/docs/methods/email/update_status link. I am getting success response from the api and it is stdClass Object ( [success] => 1, [code] => 200). Unfortunately which is not working properly. On the email address activity timeline I got "Test Test (testing@test.com) communication subscriptions changed,
ago 7 at 14:31 GMT+2, Subscribed to the examplesubscription subscription". But the communication subscriptions sidebar not changed. Also when I use the api call to https://developers.hubspot.com/docs/methods/email/get_status , I am getting subscribed false. What would be the possible reason for strange behavior? Below the image illustrates the issue broadly.

When I am calling the endpoint https://developers.hubspot.com/docs/methods/email/get_status I am getting

stdClass Object
(
    [subscribed] => 1
    [markedAsSpam] => 
    [unsubscribeFromPortal] => 
    [portalId] => portalIdHere
    [bounced] => 
    [email] => testing@test.com
    [subscriptionStatuses] => Array
        (
            [0] => stdClass Object
                (
                    [id] => subscriptionIdHere
                    [updatedAt] => 1533889177929
                    [subscribed] => 
                    [optState] => NOT_OPTED
                    [legalBasis] => PERFORMANCE_OF_CONTRACT
                    [legalBasisExplanation] => We need to send them these emails as part of our agreement with them.
                )

        )

    [status] => subscribed
)

Many many thanks.


#2

I confirm the issue and additionally one more detail, if you create a Contacts -> List that filters for contacts with the subscription type the contact was subscribed to via API, that contact won't show up. Meaning that HubSpot does not recognize the contact as subscribed to that subscription type even though it's showing up on the contacts activity timeline.