List Agent Versions
curl --request GET \
--url https://api.tess.im/agents/{id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.tess.im/agents/{id}/versions"
headers = {
"x-workspace-id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-workspace-id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.tess.im/agents/{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.tess.im/agents/{id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.tess.im/agents/{id}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.tess.im/agents/{id}/versions")
.header("x-workspace-id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tess.im/agents/{id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-workspace-id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAgent Versions
List Agent Versions
Returns a paginated list of all saved versions for a specific agent, including a field-level diff and change_summary for each version relative to the previous one. Requires the agent:version:read permission.
GET
/
agents
/
{id}
/
versions
List Agent Versions
curl --request GET \
--url https://api.tess.im/agents/{id}/versions \
--header 'Authorization: Bearer <token>' \
--header 'x-workspace-id: <x-workspace-id>'import requests
url = "https://api.tess.im/agents/{id}/versions"
headers = {
"x-workspace-id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-workspace-id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://api.tess.im/agents/{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.tess.im/agents/{id}/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-workspace-id: <x-workspace-id>"
],
]);
$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.tess.im/agents/{id}/versions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-workspace-id", "<x-workspace-id>")
req.Header.Add("Authorization", "Bearer <token>")
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.tess.im/agents/{id}/versions")
.header("x-workspace-id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tess.im/agents/{id}/versions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-workspace-id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyCode Examples
curl --request GET \
--url 'https://api.tess.im/agents/8794/versions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'x-workspace-id: YOUR_WORKSPACE_ID'
const axios = require('axios');
const config = {
method: 'get',
url: 'https://api.tess.im/agents/8794/versions',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'x-workspace-id': 'YOUR_WORKSPACE_ID'
}
};
try {
const response = await axios(config);
console.log(response.data);
} catch (error) {
console.error(error);
}
import requests
url = "https://api.tess.im/agents/8794/versions"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"x-workspace-id": "YOUR_WORKSPACE_ID"
}
response = requests.get(url, headers=headers)
print(response.json())
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tess.im/agents/8794/versions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"x-workspace-id: YOUR_WORKSPACE_ID"
]
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "Error: " . $err;
} else {
echo $response;
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.tess.im/agents/8794/versions"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("x-workspace-id", "YOUR_WORKSPACE_ID")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.tess.im/agents/8794/versions", nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
req.Header.Add("x-workspace-id", "YOUR_WORKSPACE_ID")
resp, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
client.DefaultRequestHeaders.Add("x-workspace-id", "YOUR_WORKSPACE_ID");
try
{
var response = await client.GetAsync("https://api.tess.im/agents/8794/versions");
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
catch(HttpRequestException e)
{
Console.WriteLine("\nException Caught!");
Console.WriteLine("Message :{0} ", e.Message);
}
}
}
}
require 'uri'
require 'net/http'
require 'json'
uri = URI('https://api.tess.im/agents/8794/versions')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer YOUR_API_KEY'
request['x-workspace-id'] = 'YOUR_WORKSPACE_ID'
response = http.request(request)
puts response.read_body
Headers
integer
required
Workspace ID. Required as of 2026-09-01. Until then, if omitted, the user’s selected workspace is used (deprecated). After the cutoff, a missing header returns 422.
Path Parameters
integer
required
The agent ID
Query Parameters
integer
Current page (default: 1)
integer
Number of items per page (default: 20)
Response
{
"versions": [
{
"version_id": 9,
"published_at": "2026-04-09T14:30:00+00:00",
"published_by": "user@example.com",
"rollback_from_version": 5,
"change_summary": "",
"diff": []
},
{
"version_id": 7,
"published_at": "2026-04-06T13:52:19+00:00",
"published_by": "user@example.com",
"rollback_from_version": 2,
"change_summary": "instructions, ask_user_questions",
"diff": {
"instructions": {
"previous_version": "You are a helpful assistant.",
"current_version": "You are a helpful customer support assistant."
},
"ask_user_questions": {
"previous_version": [],
"current_version": [
{
"name": "topic",
"type": "text",
"description": "What topic do you need help with?",
"required": true,
"tooltip": ""
}
]
}
}
},
{
"version_id": 1,
"published_at": "2026-04-02T17:52:17+00:00",
"published_by": "user@example.com",
"rollback_from_version": null,
"change_summary": "",
"diff": []
}
],
"current_version_number": 9,
"meta": {
"total": 9,
"page": 1,
"per_page": 20
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
| versions | array | List of version entries for this agent |
| current_version_number | integer | The version_id of the currently active version |
| meta.total | integer | Total number of versions |
| meta.page | integer | Current page number |
| meta.per_page | integer | Number of items per page |
| version_id | integer | Unique sequential identifier for this version |
| published_by | string | Email of the user who saved this version |
| published_at | string (ISO8601) | Timestamp when this version was created |
| rollback_from_version | integer | null | If this version was created by a rollback, the source version_id; otherwise null |
| change_summary | string | Comma-separated list of field names that changed relative to the previous version. Empty string when nothing changed |
| diff | object | array | Field-level diff vs. the previous version. Each key contains previous_version and current_version. Returns an empty array [] when there are no changes |
⌘I