Skip to main content
Solved

API call to get user.id based on email?

  • May 16, 2024
  • 5 replies
  • 187 views

Forum|alt.badge.img+5
  • Problem Solver III
  • 39 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

 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. 

5 replies

Forum|alt.badge.img+7
  • Klaviyo Employee
  • 182 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
  • 157 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+1
  • 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
  • 157 replies
  • Answer
  • 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)?

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


Forum|alt.badge.img+5
  • Author
  • Problem Solver III
  • 39 replies
  • May 17, 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

 

Legend, thats exactly what I was looking for :)