Segments

Segments are dynamic contact groups that update automatically as contact data changes. Define a set of filter conditions and every contact who matches them is included — no manual list management needed.

Overview

Unlike static lists where you manually add and remove contacts, segments evaluate a set of rules against your contact database and automatically include every contact that matches. The count updates in real time as contacts change.

Segments are workspace-scoped — they can only access contacts within the same workspace.

Typical segment examples:

  • Engaged subscribers: contacts who opened any campaign in the last 90 days.
  • At-risk users: active contacts who haven't opened an email in over 60 days.
  • Pro plan customers: contacts with custom field plan = "pro".
  • Renewal candidates: contacts where renewal_date is within 30 days.
  • Newsletter openers who haven't clicked: opened April campaign but did not click any link.

Creating a Segment

Go to Contacts → Segments → New Segment.

  1. Name: a descriptive name (e.g., "Engaged — Last 90 Days"). Visible in campaign audience selectors.
  2. Description: optional. Document the intent of the segment for your team.
  3. Match type: choose All conditions (AND) or Any condition (OR). See Match Type below.
  4. Add conditions: click Add Condition and configure each filter rule.
  5. The live preview count updates as you add conditions — you can see how many contacts match before saving.
  6. Click Save Segment.

Filter Conditions

Each condition consists of a field, an operator, and a value. Available fields and their operators:

Contact properties

FieldAvailable operatorsExample
Statusis / is notstatus is "active"
Emailcontains / ends with / starts with / isemail ends with "@gmail.com"
Taghas tag / does not have taghas tag "vip"
Listis in / is not inis in "Newsletter Subscribers"
First nameis / contains / is set / is not setfirst name is set
Created datebefore / after / within last N dayscreated within last 30 days
Last emailedbefore / after / never / within last N dayslast emailed before 60 days ago
Custom fieldis / is not / greater than / less than / before / after / containscustom.plan is "pro"

Engagement conditions

ConditionDescription
Opened campaignContact opened a specific campaign (or any campaign)
Did not open campaignContact did not open a specific campaign
Clicked link in campaignContact clicked any link (or a specific URL) in a campaign
Did not click in campaignContact did not click any link in a campaign
Received campaignCampaign was successfully delivered to this contact
Signed up via formContact submitted a specific signup form
Custom API eventContact has (or has not) triggered a specific named event via POST /contacts/:id/events

Date-relative conditions

Engagement conditions can be scoped to a time window (e.g., "opened any campaign within the last 90 days"). This is the key to building re-engagement and churn-risk segments that stay current without manual updates.

Match Type: AND vs OR

The match type controls how multiple conditions combine:

All conditions (AND)

A contact must match every condition to be included. Use this when you want to narrow down to a specific audience.

status = active AND tag = "vip" AND custom.plan = "pro"

Only contacts who are active, tagged vip, AND on the pro plan.

Any condition (OR)

A contact needs to match at least one condition. Use this to cast a wider net.

tag = "enterprise" OR custom.mrr > 500

Contacts who are either tagged enterprise OR have MRR above $500.

Complex logic with groups

For more complex conditions like "(A AND B) OR (C AND D)", create multiple segments and combine them as campaign audiences. For example, create "Segment A" (A AND B) and "Segment B" (C AND D), then target both in one campaign.

Using Segments

As a campaign audience

When creating a campaign, click Add Audience and switch from Lists to Segments. Select one or more segments. You can mix lists and segments in the same campaign — EmailSendX deduplicates contacts at send time so each person only receives the email once.

In automations

Segments can be used as:

  • Entry triggers: "Contact enters segment" — fires when a contact newly matches a segment's conditions. Use to start a win-back sequence when a contact becomes "inactive".
  • Branch conditions: "Contact is in segment" — use in an automation branch to send different paths based on segment membership.

Data export

Export all contacts in a segment to CSV via Contacts → Segments → [segment] → Export. The export includes all fields and tags for each matching contact. Exports are generated asynchronously and emailed to you when ready.

Segments API

Create and query segments programmatically for integration with external data pipelines or BI tools.

bash
# List all segments in the workspace
GET https://emailsendx.com/api/v1/segments
# Returns: array of segment objects with id, name, contact_count

# Get a specific segment with contact count
GET https://emailsendx.com/api/v1/segments/{segmentId}

# Create a segment via API
POST https://emailsendx.com/api/v1/segments
{
  "name": "Pro Plan — Active",
  "description": "Active contacts on the Pro plan",
  "match_type": "all",  // "all" | "any"
  "conditions": [
    {
      "field": "status",
      "operator": "is",
      "value": "active"
    },
    {
      "field": "custom.plan",
      "operator": "is",
      "value": "pro"
    }
  ]
}

# Get contacts in a segment (paginated)
GET https://emailsendx.com/api/v1/segments/{segmentId}/contacts?page=1&limit=50

# Get just the count for a segment
GET https://emailsendx.com/api/v1/segments/{segmentId}
# Response: { "contact_count": 1482, ... }
The segment contact count in the API response is cached and updated every few minutes. For real-time count, call the endpoint and check the contact_count_updated_at timestamp in the response.

Target the right audience every time

Build dynamic segments that stay current automatically — no spreadsheet gymnastics required.