GET ALL CONTACTS API - How to get Contacts for a Hubspot user


#1

Hubspot user has special permissions to either View/EDIT/Communicate with Everything/Team/Owned contacts.

What is the parameter to be used in API call to get only the contacts viewable by the Hubspot user?

Thanks
Priya


#2

Hi @pkuppuswami,

There is not currently a HubSpot API to get contacts that cross-reference to the owner of that contact. When getting contacts via the API, you will return all contacts. In your external application you would need to build logic to only show contacts that a user should see, based on their combination of view/edit/communicate.

If you don't know he owner, you can find the owner ID in he HubSpot owner field, and then get all owners via this endpoint: https://developers.hubspot.com/docs/methods/owners/get_owners


#3

Hi Priya

You could create a Smart List (with all Contacts owned by a User) then use the Contacts Lists API to get all Contacts on the Smart List.

GET /contacts/v1/lists/:list_id/contacts/all (link to the docs)

This should make life easier for you.

Have fun
Mike


#4

Thanks for the quick response. Appreciate it.

Thanks
Priya