delete https://api.onesignal.com/apps//users/by//
Overview
This action removes the user, along with all associated subscriptions and aliases. The deletion is performed asynchronously.
How to Use this API
To identify and delete a user using their OneSignal ID, use onesignal_id
as the alias label and the user’s ID as the alias ID.
Note: Authentication is required when using any alias other than the OneSignal ID.
Examples
Delete user via OneSignal ID
curl -X "DELETE" "https://api.onesignal.com/apps/<APP_ID>/users/by/onesignal_id/<ONESIGNAL_ID>" \
Delete user via Alias (requires auth)
curl -X "DELETE" "https://api.onesignal.com/apps/<APP_ID>/users/by/<ALIAL_LABEL>/<ALIAS_ID>" \
-u '<REST_API_KEY>:'
Path Parameters
alias_label
alias_label
Description
The name of the alias to use to fetch a user. All users include a special OneSignal ID alias named onesignal_id
.
Guidance
- We recommend fetching users via your identifier using the External ID alias:
external_id
. - Refer to our guide on Aliases & External ID for further details.
alias_id
alias_id
Description
The specific identifier for a given Alias to identify the user.
Guidance
- Refer to our guide on Aliases & External ID for further details.