Count the contacts matching a predicate

Returns how many contacts match a predicate tree, without returning the contacts themselves. Useful to
preview the size of an audience before paging through POST /contacts/filter, or before creating a segment.

The filters payload is exactly the same as POST /contacts/filter — see that endpoint for the full
predicate documentation. Omit filters to count every contact in the app.

Response

Besides the total, the response breaks the audience down by email reachability:

  • deliverable: contacts that can currently be emailed
  • bounced: contacts whose email address bounced
  • unsubscribed: contacts who opted out of email communications
  • without_email: contacts with no email address at all

deliverable + bounced + unsubscribed + without_email does not necessarily equal total, since a contact
can fall into more than one non-deliverable bucket.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
filters
object

Predicate tree defining which contacts to count. Omit to count every contact. See POST /contacts/filter for the full schema.

Responses

401

Authentication credentials are missing or invalid

403

You don't have permission to access contacts

422

Validation error: malformed or unsupported filters

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json