APIs & Integrations

felixclack
Member

Get contacts by batch email only returns a single result

I'm trying to use the endpoint to batch fetch contacts by email address.

https://developers.hubspot.com/docs/methods/contacts/get_batch_by_email

 

The docs describe being able to pass multiple email addresses in the params of the URL and the response will contain results for each email address.

 

It appears that it only returns a result for the last email address in the list. I've checked that the users I'm trying to retrieve exist in Hubspot. Changing the order of the email params reveals that the users do exist.

 

Also, the link in the docs for that endpoint also only returns a single result. 

https://api.hubapi.com/contacts/v1/contact/emails/batch/?email=testingapis@hubspot.com&email=new-ema...

 

Anyone else experienced this issue?

 

0 Upvotes
2 Replies 2
lscanlan
HubSpot Alumni
HubSpot Alumni

Get contacts by batch email only returns a single result

Hi @felixclack,

 

Just to confirm, are there corresponding contact records for those email addresses? So long as each one is included in an "email" parameter, and if that email address has an existing contact record, I'd expect that endpoint to include that record in the response. I was testing the behavior just now and it was working as expected for me.

 

Could you let me know your account ID and the contact record IDs you're trying to get in your response? You can send me a direct message if you'd prefer. I'm happy to take a look and see what's happening.

 

Leland Scanlan

HubSpot Developer Support
0 Upvotes
felixclack
Member

Get contacts by batch email only returns a single result

Yes, both contact records exist. In fact, if I change the order of the email params I can see that person's details.

 

I'll DM you the IDs. Thanks.

0 Upvotes