<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How tp retrieve all contacts with a specific email address in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-tp-retrieve-all-contacts-with-a-specific-email-address/m-p/775864#M62696</link>
    <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/98108"&gt;@yorambaron&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for the great question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried using the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/search#:~:text=the%20specified%20property-,CONTAINS_TOKEN,-Contains%20a%20token" target="_blank" rel="noopener"&gt;CONTAINS_TOKEN&lt;/A&gt; operator? This allows you to search for partial values by using a wildcard.&amp;nbsp;For example, use the value&amp;nbsp;&lt;CODE&gt;*@hubspot.com&lt;/CODE&gt;&amp;nbsp;to retrieve contacts with a HubSpot email address.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here's an example I just did with postman. I have several contacts in my test portal who have an email address that use bobsburgers.com as a fake domain.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;I have 7 contacts that use this domain&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2023-03-29 at 13.24.24.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/88350i163C18268617C8BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2023-03-29 at 13.24.24.png" alt="CleanShot 2023-03-29 at 13.24.24.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt; Request&amp;nbsp;&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/crm/v3/objects/contacts/search​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Request body&lt;BR /&gt;&lt;LI-CODE lang="javascript"&gt;{
    "filterGroups": [
        {
            "filters": [
                {
                    "propertyName": "email",
                    "operator": "CONTAINS_TOKEN",
                    "value": "*@bobsburgers.com"
                }
            ]
        }
    ]
}​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Response&lt;BR /&gt;&lt;LI-CODE lang="javascript"&gt;{
    "total": 7,
    "results": [
        {
            "id": "801",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "louise@bobsburgers.com",
                "firstname": "Louise",
                "hs_object_id": "801",
                "lastmodifieddate": "2023-03-23T01:06:41.059Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:06:41.059Z",
            "archived": false
        },
        {
            "id": "851",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "linda@bobsburgers.com",
                "firstname": "Linda",
                "hs_object_id": "851",
                "lastmodifieddate": "2023-03-23T01:04:59.503Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:04:59.503Z",
            "archived": false
        },
        {
            "id": "901",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "bob@bobsburgers.com",
                "firstname": "Bob",
                "hs_object_id": "901",
                "lastmodifieddate": "2023-03-17T20:49:02.694Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-17T20:49:02.694Z",
            "archived": false
        },
        {
            "id": "951",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "gene@bobsburgers.com",
                "firstname": "Gene",
                "hs_object_id": "951",
                "lastmodifieddate": "2023-03-23T01:06:02.731Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:06:02.731Z",
            "archived": false
        },
        {
            "id": "1001",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "tina@bobsburgers.com",
                "firstname": "Tina",
                "hs_object_id": "1001",
                "lastmodifieddate": "2023-03-23T01:06:46.276Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:06:46.276Z",
            "archived": false
        },
        {
            "id": "1501",
            "properties": {
                "createdate": "2023-02-16T19:08:48.222Z",
                "email": "teddy@bobsburgers.com",
                "firstname": "Teddy",
                "hs_object_id": "1501",
                "lastmodifieddate": "2023-03-23T01:05:57.561Z",
                "lastname": null
            },
            "createdAt": "2023-02-16T19:08:48.222Z",
            "updatedAt": "2023-03-23T01:05:57.561Z",
            "archived": false
        },
        {
            "id": "1601",
            "properties": {
                "createdate": "2023-02-28T21:00:31.567Z",
                "email": "mort@bobsburgers.com",
                "firstname": "Mort",
                "hs_object_id": "1601",
                "lastmodifieddate": "2023-03-23T01:04:59.985Z",
                "lastname": null
            },
            "createdAt": "2023-02-28T21:00:31.567Z",
            "updatedAt": "2023-03-23T01:04:59.985Z",
            "archived": false
        }
    ]
}​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2023 23:05:32 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2023-03-29T23:05:32Z</dc:date>
    <item>
      <title>How tp retrieve all contacts with a specific email address</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-tp-retrieve-all-contacts-with-a-specific-email-address/m-p/775734#M62686</link>
      <description>&lt;P&gt;I want to retrieve all contacts with specific email in HubSpot.&lt;/P&gt;&lt;P&gt;I ran the following command&amp;nbsp;&lt;/P&gt;&lt;P&gt;curl &lt;A href="https://api.hubapi.com/crm/v3/objects/contacts/search" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/contacts/search&lt;/A&gt; \&lt;BR /&gt;--request POST \&lt;BR /&gt;--header "Content-Type: application/json" \&lt;BR /&gt;--header "Authorization: &amp;lt;val&amp;gt;" \&amp;nbsp;&lt;BR /&gt;--data '{&amp;nbsp;"filterGroups":[ {&amp;nbsp;"filters":[ {&amp;nbsp;"propertyName": "email",&amp;nbsp;"operator": "EQ",&amp;nbsp;"value": "&amp;lt;value&amp;gt;" }&amp;nbsp;]&amp;nbsp;}&amp;nbsp;]&amp;nbsp;}'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result was empty:&lt;/P&gt;&lt;P&gt;{"total":0,"results":[]}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What did I do wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 17:38:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-tp-retrieve-all-contacts-with-a-specific-email-address/m-p/775734#M62686</guid>
      <dc:creator>yorambaron</dc:creator>
      <dc:date>2023-03-29T17:38:03Z</dc:date>
    </item>
    <item>
      <title>Re: How tp retrieve all contacts with a specific email address</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-tp-retrieve-all-contacts-with-a-specific-email-address/m-p/775864#M62696</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/98108"&gt;@yorambaron&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for the great question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried using the&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/search#:~:text=the%20specified%20property-,CONTAINS_TOKEN,-Contains%20a%20token" target="_blank" rel="noopener"&gt;CONTAINS_TOKEN&lt;/A&gt; operator? This allows you to search for partial values by using a wildcard.&amp;nbsp;For example, use the value&amp;nbsp;&lt;CODE&gt;*@hubspot.com&lt;/CODE&gt;&amp;nbsp;to retrieve contacts with a HubSpot email address.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Here's an example I just did with postman. I have several contacts in my test portal who have an email address that use bobsburgers.com as a fake domain.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;&lt;SPAN&gt;I have 7 contacts that use this domain&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CleanShot 2023-03-29 at 13.24.24.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/88350i163C18268617C8BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="CleanShot 2023-03-29 at 13.24.24.png" alt="CleanShot 2023-03-29 at 13.24.24.png" /&gt;&lt;/span&gt;&lt;/LI&gt;
&lt;LI&gt; Request&amp;nbsp;&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/crm/v3/objects/contacts/search​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Request body&lt;BR /&gt;&lt;LI-CODE lang="javascript"&gt;{
    "filterGroups": [
        {
            "filters": [
                {
                    "propertyName": "email",
                    "operator": "CONTAINS_TOKEN",
                    "value": "*@bobsburgers.com"
                }
            ]
        }
    ]
}​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;LI&gt;Response&lt;BR /&gt;&lt;LI-CODE lang="javascript"&gt;{
    "total": 7,
    "results": [
        {
            "id": "801",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "louise@bobsburgers.com",
                "firstname": "Louise",
                "hs_object_id": "801",
                "lastmodifieddate": "2023-03-23T01:06:41.059Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:06:41.059Z",
            "archived": false
        },
        {
            "id": "851",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "linda@bobsburgers.com",
                "firstname": "Linda",
                "hs_object_id": "851",
                "lastmodifieddate": "2023-03-23T01:04:59.503Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:04:59.503Z",
            "archived": false
        },
        {
            "id": "901",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "bob@bobsburgers.com",
                "firstname": "Bob",
                "hs_object_id": "901",
                "lastmodifieddate": "2023-03-17T20:49:02.694Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-17T20:49:02.694Z",
            "archived": false
        },
        {
            "id": "951",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "gene@bobsburgers.com",
                "firstname": "Gene",
                "hs_object_id": "951",
                "lastmodifieddate": "2023-03-23T01:06:02.731Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:06:02.731Z",
            "archived": false
        },
        {
            "id": "1001",
            "properties": {
                "createdate": "2022-11-03T21:42:31.255Z",
                "email": "tina@bobsburgers.com",
                "firstname": "Tina",
                "hs_object_id": "1001",
                "lastmodifieddate": "2023-03-23T01:06:46.276Z",
                "lastname": "Belcher"
            },
            "createdAt": "2022-11-03T21:42:31.255Z",
            "updatedAt": "2023-03-23T01:06:46.276Z",
            "archived": false
        },
        {
            "id": "1501",
            "properties": {
                "createdate": "2023-02-16T19:08:48.222Z",
                "email": "teddy@bobsburgers.com",
                "firstname": "Teddy",
                "hs_object_id": "1501",
                "lastmodifieddate": "2023-03-23T01:05:57.561Z",
                "lastname": null
            },
            "createdAt": "2023-02-16T19:08:48.222Z",
            "updatedAt": "2023-03-23T01:05:57.561Z",
            "archived": false
        },
        {
            "id": "1601",
            "properties": {
                "createdate": "2023-02-28T21:00:31.567Z",
                "email": "mort@bobsburgers.com",
                "firstname": "Mort",
                "hs_object_id": "1601",
                "lastmodifieddate": "2023-03-23T01:04:59.985Z",
                "lastname": null
            },
            "createdAt": "2023-02-28T21:00:31.567Z",
            "updatedAt": "2023-03-23T01:04:59.985Z",
            "archived": false
        }
    ]
}​&lt;/LI-CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2023 23:05:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-tp-retrieve-all-contacts-with-a-specific-email-address/m-p/775864#M62696</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-03-29T23:05:32Z</dc:date>
    </item>
  </channel>
</rss>

