delete https://onesignal.com/api/v1/notifications/:id?app_id=:app_id
Stop a scheduled or currently outgoing notification
Used to stop a scheduled or currently outgoing notification.
Requires Authentication Key
Requires your OneSignal App's REST API Key, available in Keys & IDs.
unless the notification was created using
include_player_ids
and targeting only one user.
Path Parameters
Parameter | Type | Description |
---|---|---|
id | String | Required Notification id |
app_id | String | Required App id |
Example Code - Cancel notification
curl --include \
--request DELETE \
--header "Authorization: Basic YOUR_REST_API_KEY" \
https://onesignal.com/api/v1/notifications/YOUR_NOTIFICATION_ID?app_id=YOUR_APP_ID
Result Format - Cancel notification
{'success': "true"}