Lead Source API

Need some help on getting a list of Lead Sources via an API. We have created custom Lead Source properties and would like to access this from our web app. I can’t seem to find an API to give me just this list.

Can anyone point me to the API that might help get this info if it’s possible?

Thank you,

Tony

Hi @tonyfarag

Unfortunately our APIs dont function like this. The properties are stored in HubSpot but the values associated to the property are stored against the object itself.

This means that if you have a Contact Property and are looking for all Contacts with a specific value, you’ll need to fetch All Contacts and then apply a filter query via our v3 CRM Search API.

This would give you a request along the lines of the following:

curl https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=YOUR_HUBSPOT_API_KEY \
 --request POST \
 --header "Content-Type: application/json" \
 --data '{
 "filterGroups":[
 {
 "filters":[
 {
 "propertyName": "Custom Property",
 "operator": "EQ",
 "value": "CUSTOM_VALUE"
 }
 ]
 }
 ]
 }'

This can be seen in our documentation here: Accounts Dashboard | HubSpot

I hope this helps!

@Willson Thank you for providing that info. That helped a lot.

Tony