List previous versions of the Template
curl --request GET \
--url https://api.hubapi.com/content/api/v2/templates/{template_id}/versionsimport requests
url = "https://api.hubapi.com/content/api/v2/templates/{template_id}/versions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/content/api/v2/templates/{template_id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/content/api/v2/templates/{template_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/content/api/v2/templates/{template_id}/versions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/content/api/v2/templates/{template_id}/versions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/content/api/v2/templates/{template_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"object": {
"id": "<string>",
"label": "<string>",
"path": "<string>",
"source": "<string>",
"category_id": 123,
"template_type": "<string>",
"folder": "<string>",
"is_available_for_new_content": true,
"is_from_layout": true,
"is_read_only": true,
"cdn_url": "<string>",
"cdn_minified_url": "<string>",
"deleted_at": 123,
"generated_from_layout_id": "<string>",
"thumbnail_path": "<string>",
"thumbnail_width": 123,
"updated": 123,
"updated_by": "<string>",
"portal_id": 123,
"archived": true,
"linked_style_id": "<string>",
"type": "<string>"
},
"user": {
"username": "<string>",
"id": "<string>",
"full_name": "<string>",
"email": "<string>"
},
"version_id": 123,
"authored_at": 123
}
]List previous versions of the Template
Get all previous versions of a template.
GET
/
content
/
api
/
v2
/
templates
/
{template_id}
/
versions
List previous versions of the Template
curl --request GET \
--url https://api.hubapi.com/content/api/v2/templates/{template_id}/versionsimport requests
url = "https://api.hubapi.com/content/api/v2/templates/{template_id}/versions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/content/api/v2/templates/{template_id}/versions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/content/api/v2/templates/{template_id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/content/api/v2/templates/{template_id}/versions"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/content/api/v2/templates/{template_id}/versions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/content/api/v2/templates/{template_id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"object": {
"id": "<string>",
"label": "<string>",
"path": "<string>",
"source": "<string>",
"category_id": 123,
"template_type": "<string>",
"folder": "<string>",
"is_available_for_new_content": true,
"is_from_layout": true,
"is_read_only": true,
"cdn_url": "<string>",
"cdn_minified_url": "<string>",
"deleted_at": 123,
"generated_from_layout_id": "<string>",
"thumbnail_path": "<string>",
"thumbnail_width": 123,
"updated": 123,
"updated_by": "<string>",
"portal_id": 123,
"archived": true,
"linked_style_id": "<string>",
"type": "<string>"
},
"user": {
"username": "<string>",
"id": "<string>",
"full_name": "<string>",
"email": "<string>"
},
"version_id": 123,
"authored_at": 123
}
]Last modified on September 9, 2026
Was this page helpful?