How to check for "Marketing email confirmation status" via HubSpot API?
Hello,
We want to build a content locker feature on our WordPress website to capture new leads. We have a page where premium content is "gated/hidden" (soft-locked) by a Newsletter email capture form popup. We want the person to enter and confirm their email via the HubSpot double opt-in feature, as we want to prevent anyone from entering dummy emails and accessing the content without providing us a meaningful lead.
The flow we're looking for is broadly outlined below:
1. Person enters their email on the email capture form in our locked-content page. 2. Our website sends this email to HubSpot. 3. HubSpot then sends the person the double opt-in confirmation email. 4. Person clicks the confirmation link to confirm their email (basically confirming that they are an existing person and not a robot or someone who entered something like test@test.com to access our premium content). 5. HubSpot updates the person's "Marketing email confirmation status". 6. Person goes back to our gated page and enters their email (our website sends an API call to check for the "Marketing email confirmation status" 7. Response is sent back from HubSpot and content is unlocked (pending their confirmation status is "User clicked confirmation")
Now, I was looking at the docs, but since I'm a novice developer I couldn't find anything related to checking for the "Marketing email confirmation status" via API.
I found some posts regarding setting the "Marketing email confirmation status" via API, but this is not what I'm looking for. I do not want to set said status (I understand this is not possible at the moment), but rather just check the "Marketing email confirmation status value" and send that value to back our website in order to deny or unlock our content. I would appreciate any insights if someone's ever done something like this.