ComRaidComRaid Docs
API referenceMessages

Preview Broadcast targeting

Evaluates a Broadcast targeting selector without creating a message. `platforms` is preview-only and filters endpoint counts; it is not a targeting selector and must not be sent under `targeting` on create.

POST
/messages/targeting/preview

Evaluates a Broadcast targeting selector without creating a message. platforms is preview-only and filters endpoint counts; it is not a targeting selector and must not be sent under targeting on create.

Authorization

bearerAuth
headerAuthorizationBearer <API key>

Project API key (cr_sk_...)

Request Body

application/json
  1. body

Broadcast targeting selector for message create. Exactly one of everyone, segment_id, or rules is required. External user ID lists belong on to.external_user_ids (Single send), not here. Does not include preview-only fields such as platforms.

everyone is the Everyone selector (Contacts with at least one Active Endpoint on the Message's Channel who are not Opted out). Built-in Segments use string IDs (seg_sys_*); saved Segments use UUIDs. Glossary names for builtins: Everyone, New contacts, Recently active, Engaged, Dormant, Android contacts, iOS contacts.

everyone?boolean

Everyone — Contacts with at least one Active Endpoint on the Message's Channel who are not Opted out

segment_id?|

Saved Segment UUID or built-in seg_sys_* (Everyone, New contacts, Recently active, Engaged, Dormant, Android contacts, iOS contacts)

rules?
platforms?array<>

Preview-only filter for endpoint platform counts. Not accepted on message create targeting; use content.push.platforms instead.

category?string

Optional Notification Category slug. When set, preview counts exclude Contacts with that Category preference disabled (same offerability filter as Broadcast create). Omitted → Active + not Opted out only.

Response Body

Preview counts

application/json
  1. response
contacts*integer

Contacts with at least one device that can receive after platforms, Identity verification and Category (same gate as Broadcast Deliveries).

active_endpoints*integer
android_endpoints*integer
ios_endpoints*integer
Example Request
curl -X POST 'https://api.comraid.io/messages/targeting/preview' \  -H 'Content-Type: application/json' \  -d '{  "segment_id": "seg_sys_subscribed",  "platforms": [    "android",    "ios"  ]}'
Example Response
{  "contacts": 120,  "active_endpoints": 140,  "android_endpoints": 90,  "ios_endpoints": 50}