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

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

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.