DELETE
/
apps
/
{app_id}
/
users
/
by
/
{alias_label}
/
{alias_id}
curl --request DELETE \
  --url https://api.onesignal.com/apps/{app_id}/users/by/{alias_label}/{alias_id} \
  --header 'Authorization: <authorization>'
"{\n \"identity\": {\n    \"onesignal_id\": \"567491ee-9105-4a87-9cbc-ed78a571645b\"\n  }\n}"

Overview

Use this API to permanently delete a user from your OneSignal project, including all associated subscriptions, properties, and aliases. The operation is asynchronous—user data will be deleted shortly after the request is accepted.


How to use this API

To delete a user, you must be able to identify them using one of the following alias types:

  • external_id (recommended and most common)
  • onesignal_id
  • A custom Alias that you have set

Pass the appropriate alias_label and corresponding alias_id in the request path.

This operation deletes all data associated with the user, including:

  • All identity aliases
  • All channel subscriptions (push, email, SMS, etc.)
  • All custom user properties

Because this is an irreversible operation, be sure that you really intend to delete the user and all their data.

Headers

Authorization
string
default:Key YOUR_APP_API_KEY
required

Your App API key with prefix Key. See Keys & IDs.

Path Parameters

app_id
string
required

Your OneSignal App ID in UUID v4 format. See Keys & IDs.

alias_label
string
required

The alias name or key to locate the user. Most commonly set as external_id but can be the onesignal_id or a custom alias.

alias_id
string
required

The specific identifier for the given alias to identify the user.

Response

202
application/json

202

The response is of type object.