Skip to content

Preview a campaign's audience

Returns recipient/suppression counts, ETA, and a localeCoverageWarning.

Omit the request body entirely to preview against the campaign’s stored audience filter. If a body is sent it must contain audienceFilter — an empty object {} is rejected with 400 (the schema is .strict() and the field is not optional).

projectId
required
string

Tenant project id (row-level isolation on every query).

campaignId
required
string

Campaign id.

Media typeapplication/json
object
audienceFilter
required

Segment predicate shared by campaigns and trigger userFilter (all fields optional).

object
locale
One of:
string
hasEmail
boolean
hasPhone
boolean
userIdLike
string
firstSeenFrom
string format: date-time
firstSeenTo
string format: date-time
lastSeenFrom
string format: date-time
lastSeenTo
string format: date-time
savedAudienceId
string
queueKey
string
Allowed values: new_paid_activation key_created_low_usage high_balance_inactive high_value low_balance_renewal churn_risk_paid
paidStatus
One of:
string
valueTier
One of:
string
minLtv
number
maxLtv
number
minBalance
number
maxBalance
number
minUsage30d
number
maxUsage30d
number
lastPurchaseFrom
string format: date-time
lastPurchaseTo
string format: date-time
lifecycleStage
One of:
string
recommendedAction
One of:
string

Preview counts + localeCoverageWarning.

Media typeapplication/json
object
total
integer
suppressionPreview
integer
eligible
integer
willReceive
integer
etaSeconds
integer
localeCoverageWarning
object
key
additional properties
any

Invalid JSON or preview parameters.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Not authenticated (no valid session/principal).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Authenticated but lacks the required project role.

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}

Resource not found (or belongs to another project — indistinguishable).

Media typeapplication/json
object
error
required

Human-readable error message.

string
message
string
Examplegenerated
json
{
"error": "example",
"message": "example"
}