Filters allow you to narrow down your data to specific criteria. The filter system uses a logical structure:
{
"filter": {
"AND": [
{
"attribute": "domain",
"comparator": "=",
"values": [
{"value": "example.com"}
]
},
{
"attribute": "tag",
"comparator": "=",
"values": [
{"value": "newsletter"}
]
}
]
}
}Note: Filters only support the "AND" operator. "OR" is not supported. In the example above, only data where the sending domain equals example.com and the tag equals newsletter will be returned.
Filter Components:
- attribute: The field to filter on (domain, tag, subaccount)
- comparator: The comparison operator (=, !=, contains, not contains)
- values: Array of values to match against