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.
Runs the real call against your workspace, with your own key.
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 -X POST "$OE/broadcasts/preview" -H "$AUTH" -H 'content-type: application/json' -d '{ "audienceIds": ["aud_4c1b8e2a7d9f05c36b4e8a71", "aud_7e3d9a1c5b2f84e06d9a3c51"]}'{ "object": "broadcast_preview", "audienceIds": ["aud_4c1b8e2a7d9f05c36b4e8a71", "aud_7e3d9a1c5b2f84e06d9a3c51"], "recipients": 412, "unsubscribed": 9, "suppressed": 3}unsubscribed counts the contacts that have unsubscribed from every one of these audiences they are in. A contact still subscribed to one of them is counted in recipients.
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.