Skip to main content
POST
Preview segment

Authorizations

Authorization
string
header
required

API key created in the organization settings.

Body

application/json
conditions
object[]
required

Conditions from the filter catalog (GET /v1/segment-builder/catalog). Up to 30.

Required array length: 1 - 30 elements

One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.

match
enum<string>

all: customers who match every condition. any: customers who match at least one.

Available options:
all,
any
sample_size
integer
default:5

Number of customers in the sample.

Required range: 0 <= x <= 20

Response

Segment preview. Nothing was saved.

object
string
required
Allowed value: "segment_preview"
customer_count
integer
required
Required range: x >= 0
whatsapp_reachable_count
integer
required

Matching customers with a phone who did not opt out.

Required range: x >= 0
email_reachable_count
integer
required

Matching customers with an email who are subscribed to emails.

Required range: x >= 0
match
enum<string>
required

all: customers who match every condition. any: customers who match at least one.

Available options:
all,
any
conditions
object[]
required

One condition of a filter segment. The same format goes into create, update, and preview and comes back in GET /v1/segments/{segment_id}.

sample
object[]
required
evaluated_at
string<date-time>
required