Unable to get the filtered data by api

  • 17 July 2023
  • 1 reply

Hello everyone,

I am using customer io post customers api to get the users from customer io and also adding the filters to get the relevent data that matches the conditions in the filtere, but it seems to be not working.

here is the snippet of code I am using to get the data

    url = ""
    payload = {
        "filter": {
            "and": [
                {"attribute": {"field": "email", "operator": "exists", "value": False}}

I want users who don’t have the email attribute in their user attributes, but I am getting users with email attributes, means the filter is not working.

would appreciate the help from the community here.



Best answer by Byron 17 July 2023, 21:14

View original

1 reply

Userlevel 2

Hi there,


Byron here from the technical support team. Great question!


Our getPeopleFilter endpoint includes a not filter that accepts a single object as a way to return matches that do not match the object filter.


To return a list of people who do not have an email attribute, try this:


  "filter": {
        "attribute": {
          "field": "email",
          "operator": "exists"