Skip to main content

Filtering

Many mail2many API endpoints support filtering. Filtering is done via the search query parameter. The parameter must be passed as URL-encoded JSON.

Filter logic​

  • Without condition: = is assumed (exact match)
  • Multiple filters: Combined with AND
  • Multiple values inside one filter: Combined with OR

Simple filters​

To filter by a single value:

search=[{"languageIso":"de"}]

Filters with multiple values​

To filter by multiple values (OR):

search=[{"genderId":[1,2]}]

Filters with conditions​

For advanced filtering, use a condition:

search=[{"email":{"condition":"like","value":"%example.com%"}}]

Available conditions​

ConditionDescription
=Exact match (default)
likeSQL LIKE operator for partial string matching
>Greater than
>=Greater than or equal
<Less than
<=Less than or equal

Combining multiple filters​

Filters are combined with AND:

search=[{"languageIso":"de"},{"genderId":1}]

This filters objects where languageIso = "de" AND genderId = 1.