Can I test to see if an email is in a List?

Is there an API call I can use to test to see if a specific email address is in a HubSpot List?

The APIs I’ve seen give me the entire list.

Is there a way that the Search API (Search the CRM - HubSpot docs) can filter by List ID?

Hey, @GLittle9 :waving_hand: Thanks for reaching out! Have you made any progress here? Happy to take a crack at an example in Postman if you are still stuck.

Best,

Jaycee

Hi,

I’ve recently used this API to achieve to check to see if a specific email belongs to a list:
https://api.hubapi.com/contacts/v1/contact/email/${email}/profile

When passing a valid email into the $email within the API call you should recieve a repsponse that has some properties you can make use of.
This API returns a response in which you can parse through and find a “list-memberships” array and within it the various “static-list-ID’s” that correspond to the lists that that user belongs to. I set different properties on the list and did X or Y in my application based on a condition of an attriubte ‘isMember’ of my list being true or false.

“list-memberships”: [

{

“static-list-id”: 123

“internal-list-id”: 98765432

“timestamp”: 1234567890

“isMember”: true

}

]

The list ID can be found within the list information on the hubspot website, but also shows within the URL of the list if you want to find it quickly. Go to lists in hubspot, click a list and the link should show as follows:
Loading.../filters

Please let me know if this helps.