Update template
Update existing OneSignal message templates for push, email, or SMS. Changes apply immediately across dashboard and API usage via the template_id reference.
Documentation Index
Fetch the complete documentation index at: https://documentation.onesignal.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
This endpoint allows you to update an existing push, email, or SMS template in your OneSignal app. Once updated, the changes are applied immediately and reflected across both the Dashboard and API when using the associatedtemplate_id.
Templates are updated using the same structure as when creating templates.
How to use this API
To update a template, you must supply:- Your OneSignal App ID found in Keys & IDs.
- The Template ID
Template ID
Each template has a unique OneSignal-generatedtemplate_id (UUID v4). You can find it:
- Using the View Templates API
- In the OneSignal Dashboard under Messages > Templates > Options > Copy Template ID

Channel-Specific Requirements
Push Templates
- The
contentsproperty must use theen(English) key along with other languages you want to support. - All Push Notification Properties are valid.
- All platforms are enabled by default. To limit, explicitly enable desired ones (e.g.,
isAndroid: truedisables iOS and Web).
Email Templates
- Set
isEmail: true - Include
email_subjectandemail_body - All Email Channel Properties are supported.
SMS Templates
- Set
isSMS: true - All SMS Channel Properties are supported.
Headers
Your App API key with prefix Key . See Keys & IDs.
Path Parameters
Query Parameters
Your OneSignal App ID in UUID v4 format. See Keys & IDs.
Body
An internal name you set to help organize and track Templates. Maximum 128 characters.
The main message body with language-specific values. Supports Message Personalization.
Required to be set true for email templates.
The body of the email in HTML format. Required for email templates. Supports Message Personalization.
Required to be set true for SMS templates.
Add personalization to your templates programmatically. No need to upload a CSV. See Dynamic Content for details.
"{\"campaign_id\": {\"A\": {\"title\": \"Custom Title A\", \"message\": \"Custom Message A\", \"url\": \"https://www.onesignal.com\"}, \"B\": {\"title\": \"Custom Title B\", \"message\": \"Custom Message B\", \"url\": \"https://www.onesignal.com/login\"}}}"
Response
The updated template record. Same shape as POST /templates.
A template record. The content block is a TemplateResourceContent whose populated fields depend on the template's channel(s).
Template ID in UUID v4 format.
Internal label set when the template was created or last updated. Maximum 128 characters.
The primary channel the template is configured for. Note: SMS is uppercased while the others are lowercased.
push, email, SMS ISO-8601 timestamp when the template was created.
ISO-8601 timestamp when the template was last updated.
The content block of a template. Every field is nullable: a field is populated only when the corresponding channel feature is enabled for the template. For example, push fields (isAndroid, isIos, headings, ...) are populated for push templates; email fields (isEmail, email_body, ...) for email templates; and SMS fields (isSMS, sms_from, ...) for SMS templates. Cross-channel templates may have multiple feature blocks populated.