Skip to main content
Solved

How to filter for profiles without emails

  • September 15, 2023
  • 3 replies
  • 145 views

Forum|alt.badge.img+1
  • Contributor I
  • 2 replies

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)

 

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.

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

3 replies

Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • 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.

 


Forum|alt.badge.img+1
  • Author
  • Contributor I
  • 2 replies
  • Answer
  • 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.


Hi there,

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