Cancel message
Stop a scheduled or currently outgoing message.
Overview
The Cancel message API can be used to stop scheduled messages from being sent. It does not delete or remove the message from the app. If a message is in the process of sending, then canceling it may not fully prevent all targeted users from receiving it.
How to use this API
This API is most commonly used when sending Transactional messages to individual users, scheduling the message in the future with send_after
. The response of our Create message API has an id
which corresponds to the message_id
used in this request. You can store this message_id
on your server and use this API to cancel sending the message to the user if not needed anymore.
If you need a way to remove a notification already sent to a user, see Remove notifications & TTL.
Headers
Your App API key with prefix Key
. See Keys & IDs.
Path Parameters
The identifier of the message in UUID v4 format. Get this id
in the response of your Create Message API request, the View Messages API, and in your OneSignal dashboard Message Reports.
Query Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Response
200
The response is of type object
.