Delete segments from OneSignal. Does not delete users or subscriptions.

Overview

The Delete segment method is used when you want to programmatically delete a segment from within the OneSignal Dashboard UI.

🚧

Once deleted segments can't be restored unless it's recreated


How to use this API

You can pass in the segment_id dictating which segment from our dashboard will be deleted.

The segment_id can be found using the View segments API or in the URL of the segment when viewing it in the dashboard as shown below:

Example shows segment ID = `0c18c3f8-d92f-4505-80ec-dd9b971f74bd`

Example shows segment ID = 0c18c3f8-d92f-4505-80ec-dd9b971f74bd

Language