Skip to navigation

Segments

The basics

A segment is a named subset of the contacts in an audience. Mailchimp distinguishes four kinds of segment:

TypeWhat it is
Regular segmentYou define conditions, such as signup date, campaign engagement, merge field values, or e-commerce activity, under a single any or all match. Its membership is every contact who currently matches them, recalculated as your contact data changes. The Segments endpoints report it as type: saved.
Advanced segmentLike a regular segment, but its conditions sit in groups that combine any and all logic. It has its own endpoints and definition format; see Advanced segments. Requires a Mailchimp plan that includes advanced segmentation.
Google Analytics segmentBuilt by Mailchimp from Google Analytics data. Read-only: you can list, read, count, and snapshot it through the advanced segments endpoints, but you can’t change its membership rules.
Static segmentYou add contacts to it explicitly, with no conditions. Membership only changes when you add or remove someone.

Static segments are also tags. When you tag a contact, Mailchimp creates or reuses a static segment behind the scenes. A static segment and a tag are the same underlying object, just reached through different features. See Contacts for tagging.

Segment conditions

A regular segment’s conditions are grouped under a match type, any or all, which determines whether a contact needs to satisfy just one condition or every condition to belong to the segment. Each condition targets a specific kind of data—a merge field, a campaign interaction, a purchase, a location—and each kind of data has its own condition shape, documented in Alternative schemas.

The Segments endpoints described here support regular segments: a single match type applied across up to 10 conditions. Advanced segments, which combine and/or logic across groups of conditions, have their own endpoints and definition format; see Advanced segments. An advanced segment can contain up to 100 conditions in up to 2 levels of groups, and working with one requires a Mailchimp plan that includes advanced segmentation.

Working with segments through the API

The Segments endpoints let you create, update, and delete segments, and read back which contacts currently belong to one with List members in segment. For a regular segment, that membership list reflects the conditions evaluated against your contacts right now, not a snapshot from when the segment was created.