Skip to main content
Problem Solver III
May 16, 2024
Solved

API call to get user.id based on email?

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 

    This topic has been closed for replies.
    DavidSandel
    Partner - Silver
    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. 

    Klaviyo Silver Master --> LowGravitySolutions.com

    5 replies

    Klaviyo Employee
    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):
    id: any, equals
    email: any, equals

    DavidSandel
    Partner - Silver
    Partner - Silver
    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

    Klaviyo Silver Master --> LowGravitySolutions.com
    Contributor II
    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
    Partner - Silver
    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. 

    Klaviyo Silver Master --> LowGravitySolutions.com
    chrisBAuthor
    Problem Solver III
    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):
    id: any, equals
    email: any, equals

     

    Legend, thats exactly what I was looking for :)

    I sometimes know things...