APIs & Integrations

alesvi
Member

Which values can the changeSource field of the webhook payload have?

SOLVE

I have created a webhook to process changes in contacts and companies. I need to filter out notifications for changes made using the HubSpot API. I was filtering all the notifications whith changeSource equals "INTEGRATION". 

That worked fine for Contacts but now I've seen that for companies I'm getting "API" for property changes and an empty string for company creations. 

Is there any other value that field can have when doing changes through the API? Can I have a list of all the possible values?

 

Thanks.

0 Upvotes
1 Accepted solution
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Which values can the changeSource field of the webhook payload have?

SOLVE

Hey @alesvi,

 

When looking to filter changes made using HubSpot API, while general API calls would have a change source of API however there are still some nuances that I'd like to share with you. Let's take a look at this documentation - HubSpot's change sources in property history where it shows the list of change source that HubSpot use and the explanation of these change source.

1. If we look at change source - Bulk Edit; While this can happen when user use the Create or update a group of contacts API endpoint, it can also occur through manual update/an integration. 

Also, do note that for the Create or update a group of contacts API endpoint, we do allow user to set their own change source value through the &auditId parameter.

 

2. If you're submitting form using the Forms API, it would falls under Forms change source however we wouldn't be able to differentiate this from manual form submission. 

 

I hope this helps to point out certain possibility!

View solution in original post

0 Upvotes
3 Replies 3
WendyGoh
Solution
HubSpot Employee
HubSpot Employee

Which values can the changeSource field of the webhook payload have?

SOLVE

Hey @alesvi,

 

When looking to filter changes made using HubSpot API, while general API calls would have a change source of API however there are still some nuances that I'd like to share with you. Let's take a look at this documentation - HubSpot's change sources in property history where it shows the list of change source that HubSpot use and the explanation of these change source.

1. If we look at change source - Bulk Edit; While this can happen when user use the Create or update a group of contacts API endpoint, it can also occur through manual update/an integration. 

Also, do note that for the Create or update a group of contacts API endpoint, we do allow user to set their own change source value through the &auditId parameter.

 

2. If you're submitting form using the Forms API, it would falls under Forms change source however we wouldn't be able to differentiate this from manual form submission. 

 

I hope this helps to point out certain possibility!

0 Upvotes
alesvi
Member

Which values can the changeSource field of the webhook payload have?

SOLVE

Thanks for your answer.

 

That auditId parameter would be very useful for us. It is only available for the "Create or update contact" endpoint, right?

Would it be possible to add it to this endpoints?

 

Contacts:

Create/Update/Delete a contact.

Companies:

Create/Update/Delete a company.

 

That would enable us to filter out in our webhook all the changes initiated by us calling the API. So if other apps use the API to do changes we do process them. Currently, by using ChangeSource we are filtering out all the changes done by any app/integration using the API. So we could be missing changes that we need to process.

 

 

 

 

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Which values can the changeSource field of the webhook payload have?

SOLVE

Hey @alesvi,

 

Currently only the Create or update a group of contacts | Contacts API support the change source parameter. For contacts/companies created through the Contact/Companies API respetively, the change source would be API. 

 

That said,  if you haven't already, I'd recommend jumping over to the HubSpot Ideas Forum and posting this idea there so that it's visible to the HubSpot product team and other HubSpot customers and developers. Hopefully this will gather more interest.

 

 

0 Upvotes