View segments
Retrieve a list of segments associated with a specific OneSignal app. Useful for programmatically accessing segment metadata such as name, creation date, and status.
Overview
Retrieve a list of segments associated with a specific OneSignal app. This is helpful when you want to access segment metadata programmatically instead of using the OneSignal Dashboard UI.
This endpoint only retrieves existing segment metadata. It does not provide the segment filters or user data.
Headers
Your App API key with prefix Key
. See Keys & IDs.
Path Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Query Parameters
The index to start returning segments from. Defaults to 0
. Segments are sorted by their creation date (created_at
) in ascending order.
The maximum number of segments to return. Default/Max: 300
. Ideal for controlling data volume in large-scale applications.
Response
200
The response is of type object
.