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.

get/apps/{app_id}/segments

Request

  • Base URL
    https://api.onesignal.com
  • URL
    https://api.onesignal.com/apps/{app_id}/segments
  • Auth
    none required

Path parameters

app_idstring required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

Query parameters

offsetinteger

The index to start returning segments from. Defaults to 0. Segments are sorted by their creation date (created_at) in ascending order.

limitinteger

The maximum number of segments to return. Default/Max: 300. Ideal for controlling data volume in large-scale applications.

Headers

Authorizationstring required

Your App API key with prefix Key . See Keys & IDs.

Response

200

total_countinteger

The total number of segments available for the app.

offsetinteger

Value set in the offset query parameter.

limitinteger

Value set in the limit query parameter.

Changes

No recorded changes to this operation across all 2 revisions of this API.