APIs & Integrations

NGrimes
Member

Email sign up via API not using a form

SOLVE

User enters email address when checking out.

They click the subscribe to newsletter checkbox.

I then sign them up to my newsletter via the api with the email address they have provided.

Using Postman it all seems to go OK but I can't find any users in HubSpot for the newsletter.

NGrimes_1-1716485575743.png

 



NGrimes_0-1716485510280.png

 

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Email sign up via API not using a form

SOLVE

Purely based on the docs, that is correct. You would need a contact record to subscribe or unsubscribe that contact.

You can either use the form submission API or the contacts API to create a new contact record.

Besides that, using a HubSpot form could also be a solution.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

0 Upvotes
7 Replies 7
NGrimes
Member

Email sign up via API not using a form

SOLVE

Cannot re-subscribe

NGrimes_1-1716586057889.png

 

0 Upvotes
NGrimes
Member

Email sign up via API not using a form

SOLVE

Unsubscribed

NGrimes_0-1716586008646.png

 

0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Email sign up via API not using a form

SOLVE

Hey, @NGrimes 👋 Thanks for your post. I have two questions to help give our community members more information:

  • Can you grab a screenshot of the filter or filters used for your Subscriber view?
  • If you go to the contact record shown in your screenshot, what is showing under the Communication Subscriptions?

CleanShot 2024-05-24 at 13.28.59@2x.png

 

Thanks for the additional details! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
NGrimes
Member

Email sign up via API not using a form

SOLVE

Hi Jaycee

Do I need to have a contact before I can subscribe them to a newsletter?

I manually created a contact, and I did use that email address when testing the newsletter signup API.

 

Screen Shot 2024-05-24 at 2.42.45 PM.png

 

Screen Shot 2024-05-24 at 2.44.18 PM.png

Where are the other email addresses though - they have to be somewhere as I can't subscribe a second time.

Screen Shot 2024-05-24 at 2.46.31 PM.png

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Email sign up via API not using a form

SOLVE

@NGrimes So the e-mail addresses you are subscribing to are currently not stored as contacts in your CRM? Because that is required before you can subscribe to a contact through an e-mail address. The behaviour of the API is a bit strange if that is the case because an error telling you that the contact doesn't exist would make more sense.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes
NGrimes
Member

Email sign up via API not using a form

SOLVE

Hi Teun

I can also unsubscribe that random email address successfully - and it will not let me add it again.

So is it that I can't use hubspot to add random email addresses for use in a newsletter blast without them being a contact?

Is the only way to achieve that functionality by using a form?


0 Upvotes
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Email sign up via API not using a form

SOLVE

Purely based on the docs, that is correct. You would need a contact record to subscribe or unsubscribe that contact.

You can either use the form submission API or the contacts API to create a new contact record.

Besides that, using a HubSpot form could also be a solution.



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes