Skip to content

Filtering

Most list endpoints accept a filters array that supports boolean combinators for building complex queries.

Filter Structure

Each filter targets a specific field and applies an operator:

json
{
  "filters": [
    { "key": "ref", "eq": "user_001" }
  ]
}

Operators

OperatorDescriptionExample
eqEquals{"key": "ref", "eq": "user_001"}
inIn list{"key": "ref", "in": ["user_001", "user_002"]}
ninNot in list{"key": "ref", "nin": ["user_003"]}
existsField exists{"key": "name", "exists": true}
regexPattern match{"key": "name", "regex": {"pattern": "^prod", "case_insensitive": true}}

Not all operators are available on every field. Refer to the API reference for the specific operators supported by each endpoint.

Boolean Combinators

Filters can be combined using and and or:

AND - all conditions must match:

json
{
  "filters": [
    {
      "and": [
        { "key": "ref", "in": ["user_001", "user_002", "user_003"] },
        { "key": "id", "nin": ["m_excluded"] }
      ]
    }
  ]
}

OR - at least one condition must match:

json
{
  "filters": [
    {
      "or": [
        { "key": "ref", "eq": "user_001" },
        { "key": "ref", "eq": "user_002" }
      ]
    }
  ]
}

Nested - combinators can be nested:

json
{
  "filters": [
    {
      "and": [
        {
          "or": [
            { "key": "ref", "eq": "user_001" },
            { "key": "ref", "eq": "user_002" }
          ]
        },
        { "key": "id", "nin": ["m_excluded"] }
      ]
    }
  ]
}