Preview how many contacts match given filter conditions WITHOUT creating a segment.
Use cases:
- Test filters before creating segment
- Estimate audience size for campaigns
- Validate filter logic
Returns: Contact count only (no actual contact data for performance)
Security
ApiKeyAuth
- US Data Centerhttps://api.mailerlogic.net/api/v1/contacts/segments/preview
- EU Data Center (coming soon)https://eu-api.mailerlogic.net/api/v1/contacts/segments/preview
curl -i -X POST \
https://api.mailerlogic.net/api/v1/contacts/segments/preview \
-H 'Content-Type: application/json' \
-H 'X-API-Key: YOUR_API_KEY_HERE' \
-d '{
"filter_conditions": {
"filters": [
{
"field": "status",
"operator": "equals",
"value": "subscribed"
},
{
"field": "campaign_opened",
"operator": "has_opened",
"value": "campaign-uuid"
}
],
"match_type": "all"
}
}'Response
{ "success": true, "count": 842 }