To unsubscribe all devices currently belonging to a specific segment, you will need to programmatically unregister each device in that segment using the Pushwoosh API. There isn't a single-click option in the dashboard to unsubscribe an entire segment's devices at once.
Here's the general process:
Retrieve Device Identifiers: First, you need to obtain a list of all unique device identifiers (e.g., Hardware IDs - HWIDs) for the users within your target segment. This step might involve using other API methods to list devices based on the tags or attributes that define your segment, or by exporting this data if your system configuration allows.
-
Use the
/unregisterDevice
API Method: For each device identifier obtained in the previous step, you will need to make an API call to the/unregisterDevice
method.-
API Endpoint:
/unregisterDevice
- Purpose: This method removes the push token associated with the device and marks the device as inactive in your Pushwoosh application.
- Documentation: You can find detailed information about this method, including request parameters and examples, in our Device API Reference.
-
API Endpoint:
Important Considerations:
-
Effect of
/unregisterDevice
: This action primarily targets the device's ability to receive push notifications by removing its token. It does not delete the device record entirely from your Pushwoosh data. - Potential for Re-registration: Be aware that if the application is still installed and actively used on the device, the Pushwoosh SDK integrated into your app might automatically request a new push token. This could lead to the device being re-registered for push notifications. To permanently prevent re-registration for users who haven't uninstalled the app, you may need to implement additional logic within your application (e.g., based on user preferences or a specific status you manage).
-
Large Segments: If your segment contains a large number of devices, you will likely need to develop a script to automate the process of iterating through your list of device identifiers and making the
/unregisterDevice
API call for each one.
If you require assistance with retrieving device identifiers for your segment or with the specifics of scripting these API calls, please consult our comprehensive developer documentation or reach out to our support team for guidance on API usage.
Comments
0 comments
Please sign in to leave a comment.