# Segments

Build dynamic contact groups based on contact data.

Segments are one of the most useful targeting tools in SendBeam. Rather than manually
curating a list of recipients, you define a set of rules and SendBeam works out which
contacts qualify each time the segment is used — so the audience follows your data as it
changes.

## What are segments?

A segment is a saved filter that produces a dynamic set of contacts. Every segment is
defined by one or more rules — conditions that a contact must meet to be included. Rules
test the contact's fields: email address, first and last name, status, source, the date they
were created, and any custom field stored on the contact.

For example, you could create a segment for:

- Contacts whose `custom_fields.country` equals `United Kingdom`
- Contacts whose email address ends with `@acme.com`
- Contacts created after `2026-01-01` whose source is `form`
- Contacts with no first name, so you can avoid a personalised greeting for them

> Segments never store contacts themselves — they store the rules. The matching contacts are resolved each time you preview the segment or send a campaign to it, so the audience is always fresh.
> 

## Segments vs lists

Both segments and lists let you target a subset of your contacts, but they work in
fundamentally different ways.

| Feature | Lists | Segments |
| --- | --- | --- |
| Membership managed by | You (by hand, via forms or the API) | SendBeam (rule evaluation) |
| Updates automatically | No | Yes |
| Supports double opt-in | Yes | No |
| Good for sign-up flows | Yes | No |
| Good for attribute-based targeting | No | Yes |

Use lists when contacts explicitly opt in to a specific topic or newsletter. Use segments
when you want to target contacts based on who they are, without requiring manual curation.

> Segment rules **can** test tags — the `tag` field takes **has tag** and **does not have tag**. What they cannot test is list membership. So "everyone tagged *vip* from the UK" is a segment; for "everyone on the Newsletter list from the UK", send to the list and narrow with a tag, or store the country as a custom field. Either way the campaign only reaches subscribed contacts.
> 

## When to use segments

Segments are the right choice in most of these situations:

- **Field-value filtering** — send region-specific campaigns by filtering on a `country` or `city` custom field without duplicating contacts across multiple lists.
- **Lifecycle stages** — record a `plan` or `stage` custom field via the API or a form, then target those stages directly in campaigns.
- **Source-based targeting** — reach only contacts who came in through a form, or only those you added by hand or via the API.
- **Data hygiene** — find contacts with an empty first name or an unexpected email domain and tidy them up before a big send.
- **Company or domain targeting** — send to everyone at a particular company by matching the end of their email address.

## Evaluated when used

Segment membership is evaluated whenever the segment is used. Whenever a contact's data
changes — a custom field is updated via the API, a name is corrected, a status changes — they
qualify or disqualify from any segments whose rules are affected the next time those segments
are resolved.

The count shown while building a segment reflects the current state of your
audience. When a campaign starts sending, SendBeam resolves the recipient list at that moment
and keeps only contacts whose status is **Subscribed**.

> Because segments are evaluated at send time, the contact count can change between when you preview a segment and when a scheduled campaign actually sends. Check the segment's count again before sending to a large audience.
>

---
Source: https://sendbeam.io/docs/segments
