Skip to content

How many contacts would receive the campaign today and how many are excluded, by reason (changes nothing)

GET
/v1/campaigns/{campaign}/audience-count
curl --request GET \
--url https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/audience-count \
--header 'Authorization: Bearer <token>'

recipients is the count before suppression (the pre-send review count, with segments compiled live); final is who would actually receive the campaign and excluded counts the rest by reason (suppressed, unconfirmed, frequency_cap, invalid_email, no_email, contact_paused, contact_frequency, gdpr_no_consent if the campaign has the GDPR safe switch), using the same rule as sending. The breakdown checks at most 50,000 contacts (sampled): if the audience is larger, approximate is true and final and excluded count only those. If the audience cannot be resolved (deleted list or segment), it returns 409 campaign_audience_invalid.

campaign
required
string
/^cmp_[a-z0-9]{26}$/

Example

cmp_01hx0000000000000000000000

Contacts in the audience, final recipients and exclusions by reason

Media typeapplication/json
object
recipients
required
integer
final
required
integer
excluded
required
object
key
additional properties
integer
>= 1
sampled
required
integer
approximate
required
boolean

Example generated

{
"recipients": 1,
"final": 1,
"excluded": {
"additionalProperty": 1
},
"sampled": 1,
"approximate": true
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Conflict

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}