Numberly
Technical Details

Filtering

Many list endpoints support narrowing results via a company-wide `filter[field][key(optional)][$op]=value` query convention, letting you filter by field, operator and value directly from the query string.

Filter Query Syntax

For endpoints that support it, results can be narrowed using a filter[field][key(optional)][$op]=value query parameter convention.

  • field: The name of the filterable field, as documented on the endpoint.
  • key (optional): For fields backed by a JSON object (like metadata), the specific key to filter on.
  • $op: The comparison operator to apply (see below).
  • value: The value to compare against.

Example:

GET /v1/messages?filter[metadata][campaign_code][$eq]=SUMMER25

Supported Operators

OperatorMeaningExample
$eqEqual tofilter[channel][$eq]=email
$neNot equal tofilter[channel][$ne]=sms
$inIn a set of values (comma-separated)filter[metadata][campaign_code][$in]=SUMMER25,WINTER25
$notInNot in a set of values (comma-separated)filter[metadata][campaign_code][$notIn]=SUMMER25
$lt / $lteLess than / less than or equal tofilter[created_at][$lte]=2026-01-01T00:00:00Z
$gt / $gteGreater than / greater than or equal tofilter[created_at][$gte]=2026-01-01T00:00:00Z
$nullIs null / is not null, given a boolean valuefilter[campaign_id][$null]=true
$containsSubstring matchfilter[recipient][$contains]=@example.com

Not every field accepts every operator. The set of operators available for a field is capped by its value type, and each endpoint's API reference documents the exact operators allowed for each of its filterable fields.

Value typeAllowed operators
Boolean$eq, $ne, $null
Enum / UUID$eq, $ne, $null, $in, $notIn
Number$eq, $ne, $null, $in, $notIn, $lt, $lte, $gt, $gte
Date / Datetime$eq, $ne, $null, $lt, $lte, $gt, $gte
String$eq, $ne, $null, $in, $notIn, $contains

Object Fields

Fields backed by a JSON object, such as metadata, accept any key. The operator is then applied to that key's value:

filter[metadata][campaign_code][$eq]=SUMMER25

Combining Filters

Multiple filters, and multiple operators on the same field, can be combined in a single request. All conditions are combined with a logical AND:

GET /v1/messages?filter[created_at][$gte]=2026-01-01T00:00:00Z&filter[created_at][$lte]=2026-01-31T23:59:59Z&filter[channel][$eq]=email

Error Handling

If the field doesn't exist, doesn't accept a key, or the operator used isn't allowed for that field, the API rejects the request:

  • HTTP Code: 400 Bad Request
  • Meaning: The filter could not be applied as written.