Create reusable message templates for push, email, and SMS channels. Templates can be accessed through both the dashboard and API using a template_id.
template_id.
Templates streamline and standardize message content across push, email, and SMS channels.
contents property with the English (en) language key.isAndroid: true disables others).isEmail: true.email_subject and email_body.isSMS: true.contents.Your OneSignal App ID in UUID v4 format. See Keys & IDs.
An internal name you set to help organize and track Templates. Maximum 128 characters.
The main message body with language-specific values. Required for push and SMS templates. Supports Message Personalization.
Required to be set true for email templates.
Required for email templates. The subject of the email. Supports Message Personalization.
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\"}}}"
200
"b17ebe45-ae35-4dce-11f8-8c3b3894a432"
An internal name you set to help organize and track Templates. Maximum 128 characters.
The date and time the template was created in ISO 8601 format.
The date and time the template was last updated in ISO 8601 format.