Delete an existing subscription.
Overview
Use this API to delete a subscription and its associated properties. Deletion happens asynchronously.
This API will stop messages from being sent to the subscription while it is deleted. It does not prevent new subscriptions from being created with the same token
. For example, if you delete a push subscription and the user opens the app again, they may be able to get push notifications again. Similarly, if you delete an email or SMS subscription and the user provides you that same email address or phone number again, a new subscription will be created.
If you want to delete a user and all the user's associated subscriptions, see Delete user API instead.
How to use this API
You must know the subscription_id
of the subscription in which you want to delete. Subscription IDs are UUIDs generated by OneSignal and cannot change. You can use the View user API to pull all the subscriptions
associated with the user and find the corresponding id
(the subscription_id
) you want to delete.