Segment types
The OneSignal platform supports two main categories of segments:Subscription-based segments
Subscription-based segments are built using filters on subscription attributes, such as device type, language, or app version.User-based segments
User-based segments are built using filters on user-level attributes rather than individual subscriptions. Currently, these segments support filters on message events and custom events. Examples include:- When a user last opened an email, SMS, or push notification sent via OneSignal.
- Specific custom events tracked in your app or website.
Creating segments
Segments can be created in the dashboard, via the API, or by uploading a CSV. Target your audience by including and excluding segments when sending messages or building Journeys.Dashboard
Create and manage segments from Audience > Segments.
API
Create segments programmatically using the Create Segment API.
CSV Import
Bulk-import Subscriptions into a segment by uploading a CSV.
Segment logic: AND vs OR
Use AND to combine filters that all must match. Use OR to match any of multiple conditions.- AND example
- OR example
Create a segment of users who:
- Have been active within the last 30 days
- Have at least 3 total sessions

Filters
Filters define which Subscriptions belong to a segment. You can combine multiple filters using AND or OR logic. If no filters are selected, the segment will default to every user of your app.| Filter | Description |
|---|---|
| First session | Date/time of user creation. |
| Last session | Last time Subscription opened the app or site. |
| Session count | Number of times Subscription opened the app or visited the site. |
| Usage duration | Total seconds the Subscription had your app/site open. |
| Language | User’s preferred language (based on device/browser). See multi-language support. |
| App version | Pulled from Android versionCode or iOS CFBundleShortVersionString. Combine with Device type to filter by different app versions per platform. See Target outdated app versions. |
| Device type | iOS, Android, Web Push (browser), Email, etc. |
| User tag | Custom tags you set via the SDK or API. See Add Tags. |
| Location | Filter by radius from coordinates (lat/long). Requires at least 1 meter and up to 2 decimal places of precision. See location permission. |
| Country | Based on last IP geolocation (ISO 3166-2 code). |
| Test users | Users marked as Test Users. |
| Message Event | Filter by message event (e.g., “clicked”, “delivered”, “failed”). See Message event filters. |
| Custom Event | Filter by custom event (e.g., “purchase”, “user login”). See Custom event filters. |
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.
between option to define a custom start and end range (in days ago).
Trackable interactions by channel:
| Channel | Trackable Interactions |
|---|---|
| Push | Sent, Received, Clicked, Failed |
| SMS | Sent, Delivered, Failed |
| Sent, Delivered, Opened, Clicked, Bounced, Failed, Suppressed, Reported as spam | |
| In-App | Received, Clicked |
Message event retention by plan
Retention periods vary by plan — see the Billing FAQ for details.
Custom event filters
Custom event filters let you target users based on meaningful actions they have taken in your app, website, or external systems.Custom event filters are currently in Early Access.To request access, contact
support@onesignal.com with your company name, OneSignal Organization ID, and App ID(s).
- The event name you want to filter on.
- Whether the user
hasorhas notperformed that action. - The minimum, maximum, or exact number of times the action must be performed.
- A time window during which the action must (or must not) occur — choose a preset range or define a custom window using the
betweenoption (start and end in days ago).
all— applies an AND condition across properties.at least one— applies an OR condition.
dot notation.
- Custom events are represented as JSON Objects.
- See Custom events for more details.
product_name→ to target users with product name24 Pack of Acorns.product_price→ to target users with product price12.99.product_quantity→ to target users with product quantity2.

Audience counts
The segment editor shows how many subscribed and unsubscribed Subscriptions are in your segment, with a breakdown by channel (push, email, and SMS).- Subscribed Subscriptions are opted in and will receive messages when you target this segment.
- Unsubscribed Subscriptions match your segment filters but are opted out and will not receive messages.

Exact counts and estimates
OneSignal always returns a count within approximately 15 seconds. Whenever possible within that time limit, you will see an exact count. For large or complex segments where exact counts can take a long time to compute, an estimate is shown instead. Estimates are labeled to make clear they are not exact:| Segment size | Format | Example |
|---|---|---|
| Above 10,000 | Count with margin of error | 140,000 +/- 5,000 |
| Below 10,000 | Less-than value | <4,800 |
Audience counts are available for subscription-based segments. User-based segment counts are not yet supported.
Managing segments
When viewing your Segments in the dashboard, you can:- View Subscriptions: See which Subscriptions are in the segment.
- Copy segment ID: Copy the segment ID to use in the API.
- Edit: Change filters or name.
- Pause / Resume: If you’re near your segment limit, you can pause segments without deleting them. 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.
- View Audit Logs: See the audit logs for who may have changed a segment and when.
- Delete: Delete the segment.
Deleting segments
Deleting a segment removes it from your list of segments. It does not delete the users inside it. To delete the users inside a segment, see Delete Users.- Dashboard
- API
- Go to Audience > Segments
- Click the three-dot menu next to a segment
- Select Delete

FAQ
How do I add myself to a segment?
Set yourself as a Test User or add a custom Tag, then create a segment that targets it.- Find your Subscriptions using your External ID.
- Either:
- Create a segment using the Test Users filter or the tag.



