Skip to main content
Solved

API call to get user.id based on email?


Forum|alt.badge.img+4
  • Problem Solver III
  • 36 replies

Hey There, 

Is there an API call that will return the users.id if I give it an email address that doesn't trigger an event.

 

Cheers

 

Chris 

Best answer by DavidSandel

AW1 wrote:

 Hi there @saulblum ! 

If I can jump in with a related question about the email. Can I call the update profile request by email (rather than by profile id)?

Yes, it says it directly in the link you included. 

View original
Did this topic or the replies in the thread help you find an answer to your question?

5 replies

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 168 replies
  • May 16, 2024

If you call Get Profiles — https://developers.klaviyo.com/en/reference/get_profiles — you can add a filter with the email address, and the response will include the profile’s internal ID.

For more information please visit https://developers.klaviyo.com/en/v2024-05-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
idanyequals
emailanyequals


DavidSandel
Partner - Silver
Forum|alt.badge.img+21
  • Partner - Silver
  • 155 replies
  • May 16, 2024

To add to what Salibum said, your exact GET url would look something like:

 


https://a.klaviyo.com/api/profiles/?filter[email]=test@example.com


Forum|alt.badge.img
  • Contributor II
  • 3 replies
  • May 16, 2024

 Hi there @saulblum ! 

If I can jump in with a related question about the email. Can I call the update profile request by email (rather than by profile id)?


DavidSandel
Partner - Silver
Forum|alt.badge.img+21
  • Partner - Silver
  • 155 replies
  • Answer
  • May 16, 2024
AW1 wrote:

 Hi there @saulblum ! 

If I can jump in with a related question about the email. Can I call the update profile request by email (rather than by profile id)?

Yes, it says it directly in the link you included. 


Forum|alt.badge.img+4
  • Author
  • Problem Solver III
  • 36 replies
  • May 17, 2024
saulblum wrote:

If you call Get Profiles — https://developers.klaviyo.com/en/reference/get_profiles — you can add a filter with the email address, and the response will include the profile’s internal ID.

For more information please visit https://developers.klaviyo.com/en/v2024-05-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
idanyequals
emailanyequals

 

Legend, thats exactly what I was looking for :)