Preview contacts matching conditions
Preview the contacts matching a set of conditions without saving a segment.
Preview the contacts matching a set of conditions without saving a segment.
The body is the same set of conditions accepted when creating or updating a segment, so this is how to check who a filter reaches, and how many, before persisting it. Nothing is stored and no contact is modified.
Call the segment filter attributes endpoint first to discover the valid attribute,
operator and value combinations.
API Token authentication
Profile uuid parameter
550e8400-e09b-41d4-a716-400055000000Conditions to preview, in the same shape accepted when creating a segment
How to combine multiple conditions
ANDPossible values: Page number
1Number of items per page
25Narrow the preview to contacts whose email matches
john.doe@example.comemailPossible values: ascPossible values: Success response
Unauthenticated response
Validation error response
Error response
POST /api/reach/v1/profiles/{profileUuid}/segmentation/filters/contacts HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 198
{
"conditions": [
{
"attribute": "email",
"operator": "equals",
"value": "example@example.com"
}
],
"logic": "AND",
"page": 1,
"per_page": 25,
"search": "john.doe@example.com",
"sort_by": "email",
"sort_direction": "asc"
}{
"data": [
{
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"name": "John",
"surname": "Doe",
"email": "john.doe@example.com",
"phone": "+14155552671",
"subscription_status": "subscribed",
"subscribed_at": "2023-01-01T00:00:00Z",
"unsubscribed_at": "2023-06-15T00:00:00Z",
"source": "api",
"note": "VIP customer"
}
],
"meta": {
"current_page": 1,
"per_page": 15,
"total": 100
}
}Last updated
Was this helpful?