v1
latestOpenAPI 3.1.02026-07-26497885.9 KBCreate template
Create reusable message templates for push, email, and SMS channels. Templates can be accessed through both the dashboard and API using a template_id.
post/templates
Headers
Authorizationstring required
Your App API key with prefix Key . See Keys & IDs.
Content-Typestring required
Request body
Example request
{
"dynamic_content": {
"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 created template record. content reflects the configuration as stored — fields not relevant to the chosen channel are returned as null.