How many contacts would receive the campaign today and how many are excluded, by reason (changes nothing)
const url = 'https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/audience-count';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
cmp_01hx0000000000000000000000Responses
Section titled “Responses”Contacts in the audience, final recipients and exclusions by reason
object
object
Example generated
{ "recipients": 1, "final": 1, "excluded": { "additionalProperty": 1 }, "sampled": 1, "approximate": true}No session, expired session, or invalid, expired or revoked API key
object
object
Example
{ "error": { "code": "not_found" }}Does not exist or is not visible to you
object
object
Example
{ "error": { "code": "not_found" }}Conflict
object
object
Example
{ "error": { "code": "not_found" }}Internal error
object
object
Example
{ "error": { "code": "not_found" }}