Preview the contacts of a segment

Return a page of the contacts that currently match a saved segment. Nothing is saved or sent.

Endpoint

POST
/contacts-segments-run-query

Body

NameTypeRequiredDescription
campaign_segment_idintegerYesSegment to run.
organization_idintegerYesYour API key's organization ID (the segment must belong to it).
$limitintegerNoPage size. Default 10, max 100.
$skipintegerNoNumber of contacts to skip.

Request

Response

json

Each row is one contact. conversation_id is the contact's conversation on the segment channel (or null). The channel_whatsapp_* columns are only present for whatsapp segments. A segment without rules returns total: 0.

Errors

StatusWhen
400campaign_segment_id is missing, or an AI segment's selector fails.
403The segment does not belong to organization_id, or organization_id is not your API key's organization.
404The segment does not exist or is deleted.

Report an issue with this documentation

Please log in to report issues with our documentation.