APIs & Integrations

AJönsson1
Member

Webhook with object type subscription

Hi,

I am trying to create a webhook using the new BETA functionality. 

AJnsson1_0-1732719939074.png


I would like to trigger the webhook when a status is changed for a subscription. When I use the API endpoint https://api.hubapi.com/communication-preferences/v4/statuses/<email>?channel=EMAIL
I get all subscriptions with the status:

{
"businessUnitId": 0,
"channel": "EMAIL",
"subscriberIdString": <email>,
"subscriptionId": <subscriptionId>,
"subscriptionName": <name>,
"status": "SUBSCRIBED",
"source": <source>,
"legalBasis": "CONSENT_WITH_NOTICE",
"legalBasisExplanation": "\n<p>I agree.</p>",
"setStatusSuccessReason": null,
"timestamp": "2024-11-26T11:59:19.215Z"
},

Am I looking at the wrong property or do you have any suggestion on how I can achieve this?

Br,
André

0 Upvotes
5 Replies 5
zach_threadint
Top Contributor

Webhook with object type subscription

Hi @AJönsson1 👋

 

The "Subscriptions" CRM object-type is part of HubSpot's Commerce offering -- it's completely separate to a Contact's "Communication Subscriptions". As far as I'm aware, it's not currently possible to configure a webhook subscription based on a Contact's "Communication Subscriptions". However, I could be wrong.

 

Unless someone else chimes in here, you may have to consider a polling solution that would call HubSpot's Subscription Preferences API.

 

I hope this proves helpful. Please let me know if you have any follow-up questions.

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


0 Upvotes
AJönsson1
Member

Webhook with object type subscription

Hi Zach,

Okay, then I am not sure what the purpose would be for that webhook but thank you for the information. Yes, but I would like to avoid get all contacts and only those that hase been changed since the last time I checked. I am working on an integration towards Dynamics CRM.

Do you know i there are some other properties that could be used to set up a webhook for this kind i task?

Br,
André

0 Upvotes
zach_threadint
Top Contributor

Webhook with object type subscription

Hi @AJönsson1 👋

 

Not that I'm aware of, unfortunately. @Jaycee_Lewis 👋 do you know if Contact "Communication Subscriptions" are planned to be added to webhook subscriptions as a selectable object type? If not, are you aware of any plans to store Communication Subscription statuses as property values on the Contact object type? Thanks 🙌

All the best,

Zach

--

Zach Klein
HubSpot Integrations & App Developer
Meanjin / Brisbane, Australia



Say g'day


If my post helped answer your query, please consider marking it as a solution.


0 Upvotes
Jaycee_Lewis
Community Manager
Community Manager

Webhook with object type subscription

Hey, @AJönsson1 👋 Is your custom webhook producing any information? It's not clear if you're getting — no response, an error, or something unexpected.

 

Thanks! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
AJönsson1
Member

Webhook with object type subscription

Hello Jaycee,

No I don´t get any response at all. So my question is if I have missunderstood which property to use or if I am doing anything else wrong? I have tested other webhooks on contacts with success.

Br,
André

0 Upvotes