DELETE
/
templates
/
{template_id}
?app_id=
{app_id}
Delete template
curl --request DELETE \
  --url 'https://api.onesignal.com/templates/{template_id}?app_id={app_id}' \
  --header 'Authorization: <authorization>'
{
  "success": true
}

Overview

This endpoint allows you to delete a single template associated with your OneSignal app. Deletion is immediate and irreversible.
If the template is currently used in a Journey, it cannot be deleted until that Journey has been deleted.

How to use this API

Required Parameters
  • template_id (path param): The OneSignal-generated UUID of the template to delete.
  • app_id (query param): Your OneSignal App ID.

Where to Find template_id

Each template has a unique OneSignal-generated template_id (UUID v4). You can find it:
  • Using the View Templates API
  • In the OneSignal Dashboard under Messages > Templates > Options > Copy Template ID
Copy Template ID in OneSignal Dashboard

Copy Template ID


Headers

Authorization
string
default:Key YOUR_APP_API_KEY
required

Your App's API key found in Settings > Keys & IDs.

Path Parameters

template_id
string
default:YOUR_TEMPLATE_ID
required

The template ID in UUID v4 format. See Templates.

Query Parameters

app_id
string
default:YOUR_APP_ID
required

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

Response

200
application/json

200

The response is of type object.