Update previously created templates for push, email and sms visible and usable in the dashboard and API.
This endpoint lets you update an existing template using the same payload format as creating templates. This will immediately change the template in OneSignal and anything using that template to generate messages will have the new content going forward.
Push Templates
Recommended:
- Set the
contents
property with the English (en
) language. See Push Notification Content for details.
All Push Channel Properties are valid to include in your push templates.
By default, all push platforms are enabled (set to true
). You can disable specific push platforms by only setting the ones you want enabled to true. For example, setting isAndroid: true
will make iOS and Web platforms disabled in the template. See Platforms to delivery To for details.
Email Templates
Requirements:
- Set
isEmail: true
. - Must include the
email_subject
andemail_body
properties.
All Email Channel Properties are valid to include in your email templates.
SMS Templates
Requirements:
- Set
isSMS: true
.
All SMS Channel Properties are valid to include in your SMS templates.
Template ID
The template_id
can be found in the URL of the template when viewing it in the dashboard.