Get a broadcast's audience counts
/v1/email/broadcasts/{broadcast_id}/countsconst counts = await bird.broadcasts.counts("eb_01krdgeqcxet5s7t44vh8rt9mg");
console.log(counts.total, counts.addressable, counts.sendable);counts = client.broadcasts.counts("eb_01krdgeqcxet5s7t44vh8rt9mg")
print(counts.total, counts.addressable, counts.sendable)counts, err := client.Broadcasts.Counts(context.Background(), "eb_01krdgeqcxet5s7t44vh8rt9mg")
if err != nil {
log.Fatal(err)
}
fmt.Println(*counts.Total, *counts.Addressable, *counts.Sendable)$counts = $bird->broadcasts->counts('eb_01krdgeqcxet5s7t44vh8rt9mg');
echo $counts->getTotal(), ' ', $counts->getAddressable(), ' ', $counts->getSendable();bird email broadcasts counts <broadcast-id>curl -X GET "https://us1.platform.bird.com/v1/email/broadcasts/{broadcast_id}/counts" \
-H "Authorization: Bearer $TOKEN"{
"broadcast_id": "eb_01krdgeqcxet5s7t44vh8rt9mg",
"status": "draft",
"next": [
{
"kind": "operation"
}
],
"total": 13000,
"addressable": 12500,
"sendable": 12000
}
Returns a live estimate of how many contacts the broadcast can reach, narrowing from everyone in its audience down to the ones the send would go to.
totalis every contact in the audience.addressableis how many of those have an email address.sendableis how many addressable contacts are not suppressed for the broadcast's category.
A transactional broadcast still reaches a contact who unsubscribed from or complained about marketing mail. A marketing broadcast does not.
The estimate can change until the broadcast sends. The broadcast must have an audience selected; otherwise, the request returns 422.
These are audience numbers, and sending does not change them: after a send they still describe who the broadcast resolved to, not what happened to them. status says which of the two situations you are in. For delivery outcomes, read the broadcast's recipients for per-recipient status, its events for the raw feed, or email statistics by broadcast for the aggregates.
Paramètres
broadcast_idstringBroadcast identifier. Starts with eb_.
Contenu de la réponse
broadcast_idThe broadcast these counts are for.
statusWhere the broadcast is in its lifecycle, so the counts read in context. Anything past draft or scheduled means these numbers describe an audience the broadcast has already been sent to, not one it is about to reach.
nextWhat to do next, given where the broadcast is. On a broadcast that has already sent this names the reads that carry delivery outcomes, which these counts never do. An empty list means there is nothing to do; the field is absent entirely on responses that do not report next actions.
totalHow many contacts are in the audience.
addressableHow many of those contacts have an email address. A contact with no address is not counted. This is never higher than total.
sendableHow many of the addressable contacts are not suppressed for this broadcast's category, which is who the email would actually go to. This is never higher than addressable. Which suppressions apply depends on the category, so the same audience can give a higher number for a transactional broadcast than for a marketing one. A transactional broadcast still reaches people who unsubscribed from or complained about marketing mail, and a marketing broadcast does not.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.