Skip to main content
POST

Authorizations

Authorization
string
header
default:Bearer brew_your_api_key
required

Send your Brew API key as Authorization: Bearer brew_xxx.

Headers

X-Brand-Id
string

The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.

Required string length: 1 - 64

Body

application/json

A whole email address matches only that contact. Other text matches the contacts whose email, first or last name contains any of its words, in sort order.

Minimum string length: 1
filters
object[]
audienceId
string

Scope to a saved audience's members. The audience's stored filter set is evaluated as one unit with its own logicalOperator (an OR audience stays an OR), then ANDed with filters. Unknown / cross-brand id, or an audience a send would refuse (unusable filters, a cohort still building) → 400.

Minimum string length: 1
logic
enum<string>
default:and
Available options:
and,
or,
none
sort
string
default:createdAt
Minimum string length: 1
order
enum<string>
default:desc
Available options:
asc,
desc
count
boolean
default:false
groupBy
string[]

With count: true: also count per value of up to two fields (a contact field, a custom field, or emailDomain), largest group first.

Required array length: 1 - 2 elements
Required string length: 1 - 200
bucket
enum<string>

With count: true: also count per UTC createdAt day, week (Monday start) or month.

Available options:
day,
week,
month
limit
integer
default:50
Required range: 1 <= x <= 100
cursor
string
Minimum string length: 1
include
enum<string>[]

openProfile attaches each returned contact's smart-send open-time profile (needs the emails permission as well). A page then holds at most 10 contacts; not with count: true.

Required array length: 1 element
Available options:
openProfile

Response

A page of matching contacts — or { count } when count: true.

data
object[]
required
pagination
object
required