API Calls to SQL database to manage 'unsubscribe from all emails' set up


#1

When setting up APIs to manage consent on an external SQL database

Is there a way we are able to fire off an event to update a SQL database, or an API call to remove the customer/contact from all our internal (non hubspot) systems that manage consent?


#3

Hi @HGSNC, you could conceivably make a request to your SQL database if it supports REST API requests when consent changes on a contact. You could subscribe to the hs_email_optout property changes with our Webhooks API: https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview, then programmatically make the request to your SQL database to update it there.