Skip to main content

Concept

List suppression

Pass one or more existing lists as a suppression filter and any records appearing in those lists are excluded from your count, query, or new list build. The most common use is excluding past customers, opt-outs, and existing pipeline.

How it works

Include list_suppression_ids on the request: an array of list ids that the API already knows about. Records matching any of those lists are subtracted from the result. The lists themselves are unchanged.

Count consumer records, excluding two suppression lists
{
  "data_source_id": 4,
  "filters": [{ "field": "state", "values": ["TX"] }],
  "list_suppression_ids": [12, 19]
}

Choosing a match type

By default, each suppression list uses the matching criteria it was built with: phone lists match by phone, mailing lists match by address. Override that with the top-level match_type field if you want all suppression lists to compare on a specific key. The accepted values are the same as for deduplication and depend on the data source being queried.

Suppress by phone, regardless of how each list was built
{
  "data_source_id": 4,
  "filters": [{ "field": "state", "values": ["TX"] }],
  "list_suppression_ids": [12, 19],
  "match_type": "phone"
}

To find out which match types a given list supports, fetch it with GET /api/v1/lists/:id and read the available_match_types array on the response.

Multiple suppression lists

Suppression lists are OR'd together. A record that appears in any of the provided lists is excluded. Order does not matter. Pass several lists to combine an opt-out list with a past-customer list with a competitor list, etc.

Rejected suppression lists

Every id must be a list in your account that has finished processing, of any type except a breakdown. If any id is unknown, deleted, still processing or importing, failed, withdrawn, a breakdown, or belongs to another account, the request fails with 422 and the error names those ids. A list with no records to suppress fails the same way, with "list_suppression_ids have no records to suppress: 12". If a list could not be checked for records just then, the error says so and names it; retry in a few minutes. Count jobs are checked when you submit them and again when they run; if a list is deleted or withdrawn in between, the job ends with status failed.

422 response
{
  "error": "list_suppression_ids must be ready lists in this account: 12, 19"
}

A request also fails with 422 when nothing tells it how to match records against the lists (no match_type, and no dedupe from select_type, phones or emails), or when the data source can't match the lists on the given match_type or select_type. It also fails when a list has no values in any key the request matches on: an address and email file matched on phone, or an audience export whose phones or emails weren't exported. A file holding only emails, only phones or only addresses is also matched on that key, so it is accepted. The error names the lists that fail. Set a match_type the data source supports, or one the lists hold, to fix it. On count jobs, set list_suppression_ids on the base request; derivatives can't carry their own, and a derivative that clears the match fails the same way.

Used by