Update a template
PUT /v3/templates/<templateRef>
Updates a template. Every update increases the value in the revision
key by one.
At a minimum, you must provide the following required attributes in the request body:
RequestResponse
curl -X PUT '<baseURL>/v3/templates/340ced1b-c9b7-43f0-9eec-2b9f0b7693fa' \
-H 'Authorization: Bearer <accessToken>' \
-H 'Accept: application/json' \
--data-raw '
{
"name": "Alert bar template UPDATED",
"friendlyId": "alert_bar_template_1_updated",
"type": "WEB",
"status": "DRAFT",
"description": "Alert bar template WEB - UPDATED",
"render": false,
"defaultTemplate": false,
"customTemplate": true,
"templateElements": [
{
"id": "html",
"template": "<div id=\"test\">My updated test div</div>"
},
{
"id": "css",
"template": "#test {text-transform: uppercase}"
},
{
"id": "js",
"template": "insertHTMLBefore(\"body\");\n\nconst testDiv = document.querySelector(\"#test\");\ntestDiv.insertAdjacentHTML(\"afterbegin\", \"<p>Hello from JavaScript</p>\")"
},
{
"id": "freemarker",
"template": "{}"
}
]
}'
RequestResponse
{
"clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
"href": "<baseURL>/v3/templates/340ced1b-c9b7-43f0-9eec-2b9f0b7693fa",
"ref": "340ced1b-c9b7-43f0-9eec-2b9f0b7693fa",
"name": "Alert bar template UPDATED",
"description": "Alert bar template WEB - UPDATED",
"modifiedByRef": "zwxCA58jwLzfeU2mNGgalCpoJzNVYOJl@clients",
"modifiedAt": "2025-07-12T11:50:22.53994Z",
"revision": 2,
"archived": false,
"friendlyId": "alert_bar_template_1_updated",
"type": "WEB",
"status": "DRAFT",
"templateElements": [
{
"id": "html",
"template": "<div id=\"test\">My updated test div</div>"
},
{
"id": "css",
"template": "#test {text-transform: uppercase}"
},
{
"id": "js",
"template": "insertHTMLBefore(\"body\");\n\nconst testDiv = document.querySelector(\"#test\");\ntestDiv.insertAdjacentHTML(\"afterbegin\", \"<p>Hello from JavaScript</p>\")"
},
{
"id": "freemarker",
"template": "{}"
}
],
"render": false,
"defaultTemplate": false,
"tags": [],
"customTemplate": true
}