I’m confused on whether you’re querying the list of user emails via Batch API or Search API since you mention both.
If you are using Search API, you can use filter groups and the IN operator (and put the emails in an array) on a property to run the search. I’m not sure if there’s a limit on how many items can be in an array.
Eg,
This has two OR filters that searches the email field and work_email field and will return records if any result is true.
{
"filterGroups": [
{//Searches the email field
"filters": [
{
"propertyName": "email",
"operator": "IN",
"values": ["bh@hubspot.com", "emailmaria@hubspot.com"]
}
]
},
{//Searches the work_email field
"filters": [
{
"propertyName": "work_email",
"operator": "IN",
"values": ["red@hubspot.com", "blue@hubspot.com"]
}
]
}
]
}
I do agree with you that Batch API errors could be a lot more useful.