Delete template
Permanently delete a specific message template from your OneSignal app using its template ID. Templates used in Journeys must be removed from those Journeys before deletion.
Overview
This endpoint allows you to delete a single template associated with your OneSignal app. Deletion is immediate and irreversible.
Important: If the template is currently used in a Journey, it cannot be deleted until that Journey has been removed.
How to use this API
Required Parameters
template_id
(path param): The UUID of the template to delete.app_id
(query param): Your OneSignal App ID.
Where to Find template_id
You can locate the template ID in several ways:
1. Use the View templates API
This API returns a list of all templates and their UUIDs.
2. From the OneSignal Dashboard
Navigate to Messages > Templates, then:
-
Click Options > Copy Template ID
Copy Template ID
-
Or get the ID from the URL when viewing the template:
Template ID in the URL when viewing the template
Headers
Your App's API key found in Settings > Keys & IDs.
Path Parameters
Query Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Response
200
The response is of type object
.