APIs & Integrations

Egoi
Contributor | Partner
Contributor | Partner

Search API only finds a contact by its primary email

SOLVE

Hi there,

I encountered this situation where a contact is not searchable unless using the primary email of the contact. Is not possible to find a contact by any email associated using de API?

The body of the request I using is this one:

 

 

 

{
		"filterGroups": [
			{
				"filters": [
					{
						"propertyName": "email",
						"operator": "EQ",
						"value": ""
					}
				]
			}
		]
	}

 

 

 

0 Upvotes
1 Accepted solution
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Search API only finds a contact by its primary email

SOLVE

Hi @Egoi ,

 

You will also need to include the property hs_additional_emails in your search call, so update your body to something like this:

{
  "filterGroups": [
    {
      "filters": [
        {
          "value": "((email))",
          "propertyName": "hs_additional_emails",
          "operator": "CONTAINS_TOKEN"
        }
      ]
    },
    {
      "filters": [
        {
          "value": "((email))",
          "propertyName": "email",
          "operator": "EQ"
        }
      ]
    }
  ]
}


Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


View solution in original post

3 Replies 3
Teun
Solution
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Search API only finds a contact by its primary email

SOLVE

Hi @Egoi ,

 

You will also need to include the property hs_additional_emails in your search call, so update your body to something like this:

{
  "filterGroups": [
    {
      "filters": [
        {
          "value": "((email))",
          "propertyName": "hs_additional_emails",
          "operator": "CONTAINS_TOKEN"
        }
      ]
    },
    {
      "filters": [
        {
          "value": "((email))",
          "propertyName": "email",
          "operator": "EQ"
        }
      ]
    }
  ]
}


Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


Egoi
Contributor | Partner
Contributor | Partner

Search API only finds a contact by its primary email

SOLVE

Thank you! Worked like a charm 🙂 

0 Upvotes
Teun
Recognized Expert | Diamond Partner
Recognized Expert | Diamond Partner

Search API only finds a contact by its primary email

SOLVE

Awesome!



Learn more about HubSpot by following me on LinkedIn or YouTube

Did my answer solve your issue? Help the community by marking it as the solution.


0 Upvotes