Hello!
I’m using the v3 API to search contacts by email domain. I’m following the docs Search the CRM - HubSpot docs but the wildcard search is returning more results than it should.
For example, I created 2 contacts on my Hubspot account with the following emails: "gmail.com@fake.co" and “fake.co@gmail.com” and I’m using the following request body:
{
"filterGroups": [
{
"filters": [
{
"operator": "CONTAINS_TOKEN",
"propertyName": "email",
"value": "*@fake.co"
}
]
}
]
}
This is returning both contacts, but I believe it should return only one (gmail.com@fake.co). If I use “*@gmail.com” both contacts are still returned. I also tried “*@gmail.com” but it also returns both contacts.
So I believe the wildcard search is not working properly, as it’s ignoring the “@”.
How can I properly search by email domains using the API?
Tank you