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
| Name | Type | Required | Description |
|---|---|---|---|
campaign_segment_id | integer | Yes | Segment to run. |
organization_id | integer | Yes | Your API key's organization ID (the segment must belong to it). |
$limit | integer | No | Page size. Default 10, max 100. |
$skip | integer | No | Number 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
| Status | When |
|---|---|
400 | campaign_segment_id is missing, or an AI segment's selector fails. |
403 | The segment does not belong to organization_id, or organization_id is not your API key's organization. |
404 | The segment does not exist or is deleted. |
Report an issue with this documentation
Please log in to report issues with our documentation.