To trim devices where the user has turned push off at the OS level, use the default Push Alerts Enabled tag (Boolean) together with the Pushwoosh APIs. These devices still have valid push tokens, but notifications are never displayed.
1. Export the segment
POST https://api.pushwoosh.com/api/v2/audience/exportSegment
{
"auth": "YOUR_API_ACCESS_TOKEN",
"applicationCode": "YOUR_APPLICATION_CODE",
"filterExpression": "AT(\"YOUR_APPLICATION_CODE\", \"Push Alerts Enabled\", eq, false)",
"generateExport": true,
"exportData": ["hwids"],
"format": "csv"
}
The response contains a task_id.
2. Retrieve the export
POST https://api.pushwoosh.com/api/v2/audience/exportSegment/result
{
"auth": "YOUR_API_ACCESS_TOKEN",
"task_id": "TASK_ID_FROM_STEP_1"
}
The response returns a filename link to a ZIP archive containing the CSV.
Important: since 3 April 2025 the download requires authorization. From a script, send:
Authorization: Token YOUR_API_ACCESS_TOKEN
From a browser it is enough to be logged in to the Control Panel.
3. Bulk unregister the devices
POST https://api.pushwoosh.com/api/v2/audience/bulkUnregisterDevice
{
"application": "YOUR_APPLICATION_CODE",
"auth": "YOUR_API_ACCESS_TOKEN",
"devices": [
{ "hwid": "device hwid 1" },
{ "hwid": "device hwid 2" }
]
}
The response returns a request_id. Track progress with:
GET https://api.pushwoosh.com/api/v2/audience/bulkUnregisterDevice/{request_id}?detailed=true
See the Audience API reference.
You can schedule this as a periodic job (for example monthly) to keep the device list clean.
One-time cleanup: if you cannot implement the API flow yet, contact Pushwoosh support — a one-off cleanup of devices with "Push Alerts Enabled" = false may be possible.
Comments
0 comments
Please sign in to leave a comment.