Skip to the documentation
API

Count who a broadcast would reach

The numbers a send to these audiences would start from, without sending or writing anything: how many people it would reach, how many are skipped because they unsubscribed, and how many because their address is suppressed. A contact in several of the audiences counts once.

POST/broadcasts/preview

Runs the real call on your workspace.

POST /broadcasts/preview

The numbers a send to these audiences would start from, without sending or writing anything: how many people it would reach, how many are skipped because they unsubscribed, and how many because their address is suppressed. A contact in several of the audiences counts once.

Example

Needs audiences:read alone, so a key that cannot send can still show somebody the count. audienceIds holds 1 to 10 ids and nothing else is accepted in the body.

curl
curl -X POST "$OE/broadcasts/preview" -H "$AUTH" -H 'content-type: application/json' -d '{  "audienceIds": ["aud_4c1b8e2a7d9f05c36b4e8a71", "aud_7e3d9a1c5b2f84e06d9a3c51"]}'
Response
{  "object": "broadcast_preview",  "audienceIds": ["aud_4c1b8e2a7d9f05c36b4e8a71", "aud_7e3d9a1c5b2f84e06d9a3c51"],  "recipients": 412,  "unsubscribed": 9,  "suppressed": 3}

unsubscribed counts the contacts in these audiences who have unsubscribed. The rest are counted in recipients, apart from the suppressed ones.

suppressed counts the subscribed contacts whose address is on the suppression list after a bounce or a complaint, or because somebody added it there.

The count is taken at the moment of the call. An id that names no audience is a 404 audience_not_found, and All contacts is a 422 audience_is_everyone.

Reference