Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore Personalize
Data privacy
Before you start sending data
Integrating with Sitecore Personalize
Stream API
Personalize API Flow execution
REST APIs
  • Sitecore Personalize for developers
  • REST APIs
  • Template REST API
  • Retrieve revisions of a template

Retrieve revisions of a template

GET /v3/templates/<templateRef>/revisions

Retrieves all revisions of a template.

Attribute

Type

Description

Example

templateRef

string

The reference of the template.

If you do not know the template reference, first retrieve templates.

340ced1b-c9b7-43f0-9eec-2b9f0b7693fa

In the response, the revision key contains the revision reference. You use the revision reference to retrieve a specific revision.

RequestResponse
curl -X GET '<baseURL>/v3/templates/340ced1b-c9b7-43f0-9eec-2b9f0b7693fa/revisions' \
-H 'Authorization: Bearer <accessToken>' \
-H 'Accept: application/json'
RequestResponse
{
    "href": "<baseURL>/v3/templates/340ced1b-c9b7-43f0-9eec-2b9f0b7693fa/revisions",
    "items": [
        {
            "clientKey": "pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
            "href": "<baseURL>/v3/templates/340ced1b-c9b7-43f0-9eec-2b9f0b7693fa",
            "ref": "340ced1b-c9b7-43f0-9eec-2b9f0b7693fa",
            "name": "Alert bar template",
            "description": "Alert bar template WEB",
            "modifiedByRef": "zwxCA58jwLzfeU2mNGgalCpoJzNVYOJl@clients",
            "modifiedAt": "2025-07-12T10:56:46.53994Z",
            "revision": 1,
            "archived": false,
            "friendlyId": "alert_bar_template_1",
            "type": "WEB",
            "status": "DRAFT",
            "templateElements": [
                {
                    "id": "html",
                    "template": "<div id=\"test\">My 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
        },
        {
            "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:26:14.695138Z",
            "revision": 2,
            "archived": false,
            "friendlyId": "alert_bar_template_1",
            "type": "WEB",
            "status": "DRAFT",
            "templateElements": [
                {
                    "id": "html",
                    "template": "<div id=\"test\">My updated HTML</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": true,
            "defaultTemplate": false,
            "tags": [],
            "customTemplate": true
        }
    ]
}

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2026 Sitecore