OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Delete Users

How to bulk delete users

This guide will go over how to delete user records in bulk from OneSignal. If you want to delete segments without the user records see Deleting Segments.

If you would like to delete users from our API, see the API Delete Device Call. Currently you can only delete individual user records from the API.

🚧

Deleting users cannot be reversed!

Once you delete users, there is no way to get them back. Deleted users can only get push again once they:

  • Clear browser cookies, then return to your site
  • Uninstall the app and re-install the app.

❗️

DO NOT DELETE ALL USERS

Be very careful when following these steps, make sure you do not delete all users.

Jump to API Deletion Requirements

Delete Bulk Users From the OneSignal Dashboard

You can delete users from OneSignal within Dashboard > Audience > All Users

Just select the Segment you want to delete, make sure to create a Segment for deletion. We recommend using the "Last Session" filter with greater than 4320 hours (6 months). Make sure to select "greater than and NOT less than.**

Before deletion, we also recommend sending 2 notifications to this segment to try winning those users back.

Once you have your segment to delete, select the ACTIONS button in All Users, select Delete Users In Segment and confirm the segment name.

❗️

POINT OF NO RETURN

Once you press DELETE USERS this cannot be undone. Your users will be deleted.

We will email you when deletion is finished.

You cannot delete more than 1 segment at a time per app.


API Deletion Requirements

Example API DELETE User Endpoint

❗️

Deletion of devices cannot be undone

Once you delete a device, you cannot get the device record back unless the device:

  • Clears browser cookies, then return to your site
  • Uninstall the app and re-install the app.
curl --include \
     --request DELETE \
     --header "Authorization: Basic YOUR_ONESIGNAL_API_KEY" \
https://onesignal.com/api/v1/players/ONESIGNAL_PLAYER_ID?app_id=YOUR_APP_ID

Delete Users With Postman

Requirements:
1 - Postman: download postman here (free) https://www.getpostman.com/
2 - The OneSignal Player Ids to be deleted. Can be a CSV file of devices.

Step 1 - Setup Postman Collection

Open Postman app. Select "New Collection" and name it "Delete OneSignal Users"
Click "Add requests" and also name this "Delete OneSignal Users".
Save

Step 2 Setup Postman Request

In the request under "Params"

  1. Select DELETE
  2. Add the URL https://onesignal.com/api/v1/players/:player_id?app_id=YOUR_APP_ID
  3. Replace "YOUR_APP_ID" with the actual OneSignal App Id for your
  4. Set the value for "player_id" to be {{player_id}}
  1. Select "Headers"
  2. Select Authorization
  3. Type Basic YOUR_REST_API_KEY but change YOUR_REST_API_KEY to your actual REST API key that matches the app id from step 3.
  4. Save the request

Step 3 Add your player_id

You can individually delete devices by replacing the {{player_id}} with the actual player_id of the device you want deleted. Then click the "Send" button to delete it.

👍

Finished individual deletion

If you did the individual deletion, you are all done! You can continue adding player ids to delete.

If you want to delete large amounts of player ids at once continue here:

You can run a list of player_id's unto postman to delete. Make sure your CSV file has 1 column with player_id as the column header. It must looks like this:

Step 4 Run the Request

Next to the Collection, select the arrow and choose "Run"

This will open a new window. Next to:
Delay use 500 ms
Data click "Select File" and Open the .csv file of your segment.
Check Keep variable values
Uncheck "Save cookies after collection run"

❗️

DELETION PROCESS

Below is the final step. Once you select the next button the deletion process will occur.

Selecting the blue "Run Delete OneSignal Users" button will start the deletion process for all users in that csv.

Step 5 Review

That is it, you have now deleted those records from OneSignal.

You can watch the process and as long as you see "200 OK"s then you are all set.

Updated 4 months ago


Delete Users


How to bulk delete users

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.