Skip to main content
Contributor I
September 15, 2023
Solved

How to filter for profiles without emails

  • September 15, 2023
  • 3 replies
  • 215 views

I wish to only load profiles from GET /profiles where they have an email address.

None of these work:

filter=not(equals(email,null))
filter=contains(email,"@")
filter=has(email)
filter=has(attributes.email)

 

    This topic has been closed for replies.
    Best answer by null

    OK, looks like according to the docs, this filter cannot be done.

    https://developers.klaviyo.com/en/reference/get_profiles

    ...lists only `any` and `equals` as valid filters for email.

     

    Seems a shame that this basic feature is not present in 2023 and an API that’s been through three revisions.

    3 replies

    nullAuthor
    Contributor I
    September 16, 2023

    Realising now my post’s title should really be How to filter profiles to only show those WITH an email. But I’m unable to edit my post now.

     

    nullAuthorAnswer
    Contributor I
    September 18, 2023

    OK, looks like according to the docs, this filter cannot be done.

    https://developers.klaviyo.com/en/reference/get_profiles

    ...lists only `any` and `equals` as valid filters for email.

     

    Seems a shame that this basic feature is not present in 2023 and an API that’s been through three revisions.

    September 18, 2023

    Hi there,

    You can select only the fields you want with fields[profile]=external_id,first_name,last_name,... etc 
     using Get Profiles endpoint