Logo White

Segments

Build dynamic subscriber segments using all or any rule matching and preview matching recipients before sending a newsletter.

GET/v1/segments

List & create segments

List active segments (segments:read) or create a segment (segments:write) with rule conditions.

Create segment

curl -X POST https://api.bloghunch.com/v1/segments \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Verified VIPs",
    "condition_match": "all",
    "conditions": [
      { "field": "is_verified", "operator": "equals", "value": true }
    ]
  }'

Other segment endpoints

  • Get segment: GET /v1/segments/{id} (segments:read)
  • Update segment: PATCH /v1/segments/{id} (segments:write)
  • Preview matching recipients: POST /v1/segments/{id}/preview (segments:read)
  • Delete segment: DELETE /v1/segments/{id} (segments:write)