DELETE
/
apps
/
{app_id}
/
subscriptions
/
{subscription_id}
curl --request DELETE \
  --url https://api.onesignal.com/apps/{app_id}/subscriptions/{subscription_id}
"//The subscription was deleted successfully \n{}"

Overview

Use this API to delete an existing subscription and its associated properties. Deletion is asynchronous, and while the subscription is being removed, messages will no longer be sent to it.

This operation only deletes a single subscription. To remove a user and all their subscriptions, use the Delete User API instead.

What Happens When You Delete

  • Messages will stop being sent to the deleted subscription.
  • Deleting a subscription does not block new subscriptions with the same token.
    • If the app is reopened or a token is re-submitted (e.g., same email or phone), a new subscription may be automatically created.
    • This ensures users can re-subscribe if needed without requiring manual intervention.

How to Use This API

Required: subscription_id

You must provide the subscription_id of the subscription to be deleted. This ID is a UUID generated by OneSignal and is immutable.

To find the subscription_id:

  1. Use the View User API.
  2. Look at the subscriptions array in the response.
  3. Identify the correct subscription by its type, token, or other metadata.
  4. Use the corresponding id field as the subscription_id.

Path Parameters

app_id
string
required

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

subscription_id
string
required

The unique Subscription ID in UUID v4 format generated by OneSignal. See Subscriptions.

Response

202
application/json

202

The response is of type object.