Templates
List Template Versions
List version snapshots for a template. Snapshots are created automatically before every update, enabling rollback if a PUT accidentally overwrites the schema.
GET
/
api
/
templates
/
{id}
/
versions
List Template Versions
curl --request GET \
--url https://api.example.com/api/templates/{id}/versionsimport requests
url = "https://api.example.com/api/templates/{id}/versions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/templates/{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.example.com/api/templates/{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.example.com/api/templates/{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.example.com/api/templates/{id}/versions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/templates/{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_bodyPath parameters
string
required
Template ID (e.g.,
tpl_7VQhP2tM9xA1kR8bN).Response
Returns an array of version snapshots, newest first (max 20).{
"data": [
{
"id": 12,
"version_number": 3,
"field_count": 42,
"change_summary": "Pre-update snapshot",
"created_at": "2026-05-02T15:30:00Z"
},
{
"id": 11,
"version_number": 2,
"field_count": 42,
"change_summary": "Pre-update snapshot",
"created_at": "2026-04-28T10:00:00Z"
}
]
}
| Field | Type | Description |
|---|---|---|
id | integer | Version ID. Use this with the Restore Version endpoint. |
version_number | integer | Sequential version number. |
field_count | integer | Number of fields in the schema at this version. |
change_summary | string | Description of what triggered the snapshot. |
created_at | string | ISO 8601 timestamp when the snapshot was created. |
Example
curl https://spitshake.io/api/templates/tpl_7VQhP2tM9xA1kR8bN/versions \
-H "X-Auth-Token: YOUR_API_KEY"
Snapshots are created automatically before every
PUT /api/templates/:id update and before submitter remapping. You don’t need to create them manually.⌘I
List Template Versions
curl --request GET \
--url https://api.example.com/api/templates/{id}/versionsimport requests
url = "https://api.example.com/api/templates/{id}/versions"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/templates/{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.example.com/api/templates/{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.example.com/api/templates/{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.example.com/api/templates/{id}/versions")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/templates/{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