A segment is a dynamic audience that groups Subscriptions based on filters like activity, country, Tags, and more. Segments help you send personalized, timely, and relevant messages.

Once created, segments update automatically as users interact with your app or site—no extra tracking required.

Segment counts only reflect opted-in Push, SMS, and Email subscriptions.

When used in Journeys or In-App Messages, segments include users and opted-out subscriptions.

To analyze unsubscribed subscriptions, use the Export CSV of Players API.


Creating segments

You can create segments in three ways:

Create a segment in the dashboard

  1. Go to Audience > Segments
  2. Click New Segment
  3. Add filters, name the segment, and click Create Segment

New Segment creation interface

Exclude segments

Exclude a segment to prevent its members from receiving a message or entering a Journey.

Common use cases:

  • Avoid sending duplicate or conflicting messages
  • Respect user messaging preferences (e.g., “opted out of promo”)
  • Prioritize transactional messages over campaigns

You can exclude segments when:

  • Sending a message
  • Building a Journey
  • Using the Exclude Segment option in segment settings

Filters

Filters define which subscriptions belong to a segment. You can combine multiple filters using AND or OR logic.

FilterDescription
First sessionDate/time of user creation.
Last sessionLast time Subscription opened the app or site.
Session countNumber of times Subscription opened the app or visited the site.
Usage durationTotal seconds the Subscription had your app/site open.
LanguageUser’s preferred language (based on device/browser). See multi-language support.
App versionPulled from Android versionCode or iOS CFBundleShortVersionString.
- Combine with Device type to filter by different app versions for each platform.
- See Target outdated app versions tutorial for more details.
Device typeiOS, Android, Web Push (browser), Email, etc.
User tagCustom tags you set via the SDK or API. See Add User Tags.
LocationFilter by radius from coordinates (lat/long). Requires location permission.
CountryBased on last IP geolocation (ISO 3166-2 code).
Test usersUsers marked as Test Users.
RootedAndroid only — whether device is rooted.
Message EventFilter by message event (e.g., “clicked”, “delivered”, “failed”). See Message event filters.

Segment filters configuration screen

Segment logic: AND vs OR

Use AND to combine filters that all must match. Use OR to match any of multiple conditions.

AND filter example

Create a segment of users who:

  • Have not returned in more than 7 days
  • Will be removed after 11 days (264 hours)

Inactive segment filter setup

OR filter example

Create a segment of:

  • Users who subscribed more than 3 days ago
  • OR users inactive for exactly 10 days

Name it something like 7 Days Inactive Or Over 3 Days New.

OR clause segment configuration

Message event filters

Message event filters allow you to filter users based on their interaction with one of your messaging channels within a certain window.

Message event filters

First select the messaging channel you want to filter on, then specify the action that you want to track for that channel and whether the user has or has not performed that action.

You can specify a minimum, maximum, or exact number of time the user must have performed the action in order to qualify, as well as a time window ranging from the last 24 hour to the last 90 days in which they must have performed or not performed the action.

See below for a list of available trackable interactions for each channel:

ChannelTrackable Interactions
PushSent, Received, Clicked, Failed
SMSSent, Delivered, Failed
EmailSent, Delivered, Opened, Clicked, Bounced, Failed, Suppressed, Reported as spam
In-AppReceived, Clicked

Segments using message event filters can include other filters. However, you cannot send messages to multiple segments if one segment uses message event filters.


Managing segments

View users

Click Options > View Users to see which subscriptions are in the segment.

Edit

Click the segment name or Options > Edit to change filters.

Pause / Resume

If you’re near your segment limit (based on your plan), you can pause segments. Targeting a paused segment will fail.

Set as default

Set a default segment to be auto-selected when sending a new message. This helps reduce targeting mistakes and save time.

Duplicate

Copy a segment’s filters to create a new one.


Deleting segments

Deleting a segment cannot be undone and does not delete the users inside it.

In the dashboard

  1. Go to Audience > Segments
  2. Click the three-dot menu next to a segment
  3. Select Delete

Segment options menu


Using the API

Use the Delete Segment API. Only removes the segment definition.

To delete users in the segment, use the Delete Users API.

{
  "name": "Segment 2",
  "filters": [
    { "field": "session_count", "relation": ">", "value": "1" },
    { "operator": "AND" },
    { "field": "tag", "relation": "!=", "key": "tag_key", "value": "1" },
    { "operator": "OR" },
    { "field": "last_session", "relation": "<", "hours_ago": "30" }
  ]
}

FAQ

How do I add myself to a segment?

  1. Find your Subscriptions using your External ID.
  2. Either:
  1. Create a segment using the Test Users filter or the tag.

Do segment counts include opted-out users?

  • Visible counts only include opted-in subscriptions.
  • Segments used in Journeys and in-app messages include both subscribed and unsubscribed subscriptions.
  • To see unsubscribed subscriptions, use the Export CSV of Players API.

Are segment counts always accurate?

Segments larger than 80,000 total users may have an estimated size, instead of a precise count, in order to calculate them quickly. To get the most accurate numbers, see the message report stats after sending the message.

What types of in-app purchases are tracked?

  • Tracked: Consumable purchases made while the OneSignal SDK is active.
  • Not tracked: Subscription purchases.
  • To import historical purchase data, use the Update User API with the purchases parameter.