Search to See if a user is in a Klaviyo Segment

Try,

filter=equals(email,"johndoe@acme.org")

Put the Query Param Key as the filter and the other as value, or you can directly do that in the URL.

1 Like

Just figured it out…This also works: https://a.klaviyo.com/api/segments/{{Segment ID}}/profiles/email={{E-Mail Address}}

/email=E-Mail Address

@Runcorn Actually my method and your method both yield errors.

?filter=

The URL path is incorrect.

Same goes to your one, try ?email=

1 Like

This one I got a status code of 200, but it is returning about 20 different emails that are not the email address I’m specifying. It should just return back one email address.

try this instead,

filter=equals(profiles.email,"johndoe@acme.org")

1 Like

This did not work either.

https://a.klaviyo.com/api/segments/{{2.Segment ID}}/profiles/?filter=equals(profiles.email,“{{2.E-Mail}}”)

Try adding this in the query fields instead of directly using it in the URL and see if it fixes the issue.

1 Like

What would be the query name?

filter should be the name.

I figured it out. I went to the Klaviyo Forum Here - https://community.klaviyo.com/lists-segments-and-profiles-35/can-t-use-filters-on-get-segment-profiles-7694. Here is the answer for anyone who is interested:

https://a.klaviyo.com/api/segments/{{Segment ID}}/profiles/?filter=any(email,[“{{E-Mail Address`}}”])

1 Like

Boy do I hate APIs so much! :rage:

@DavidGurr_Make Hopefully you can get this feature module pushed/expedited to be included.