Count a segment
How many contacts the segment matches now and how many would receive a broadcast: opted-out contacts are removed, then (with topic_id) those unsubscribed from that topic.
Path Parameters
- idstringrequired
Query Parameters
- topic_idstring
Topic id or name
Details
eligible + opted_out + topic_unsubscribed = matched.
Responses
- 200JSON object
Counts
- 401Error
Missing, malformed, or revoked API key
- 402Error
Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged
- 404Error
Not found
- 429Error
Rate limit or quota exceeded
Response Fields
- objectsegment_preview
- segment_idstring
- topic_idstring
Nullable.
- contacts_totalinteger
- matchedinteger
- opted_outinteger
- topic_unsubscribedinteger
- eligibleinteger
Errors
Every error has the same JSON shape, and request_id matches the X-Request-Id response header. Errors lists every code and what to do about it.
- 401
Missing, malformed, or revoked API key
- 402
Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged
- 404
Not found
- 429
Rate limit or quota exceeded