APIs & Integrations

hannahelliott
Member

Setting up email subscription defaults through API

Hi All,

 

We are in the process of building our API and I want to know how to set up default email subscriptions. Essentially, from our booking system we will be API-ing in both prospects & clients. The clients need to be automatically subscribed to a Sales email subscription (for comms related to their purchase) as well as a Marketing email subscription. The prospects need to be only subscribed to the Marketing email subscription though.

 

Can anyone give any guidance on what fields should/can trigger this? And how this needs to be built in? Any advice is appreciated!

Hannah

 

 

0 Upvotes
1 Reply 1
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Setting up email subscription defaults through API

Hey @hannahelliott ,

 

If you're creating these contacts in HubSpot using the Contacts API, you should update their email subscriptions status(es) using the following endpoint: https://developers.hubspot.com/docs/methods/email/update_status

 

If you're creating the contacts in HubSpot using the Forms API, you can include consent information directly in in the submission data using the v3 endpoint: https://developers.hubspot.com/docs/methods/forms/submit_form_v3

0 Upvotes