curl --request GET \
--url https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history', 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.cloudhumans.com/typebot/v1/typebots/{flowId}/history",
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>"
],
]);
$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.cloudhumans.com/typebot/v1/typebots/{flowId}/history"
req, _ := http.NewRequest("GET", url, nil)
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.cloudhumans.com/typebot/v1/typebots/{flowId}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"history": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"origin": "PUBLISH",
"version": "<string>",
"isRestored": true,
"restoredFromId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"author": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"hasDanglingReferences": true,
"content": {
"name": "<string>",
"icon": "<string>",
"groups": [
{}
],
"edges": [
{}
],
"events": [
{}
],
"variables": [
{}
],
"settings": {},
"tenant": "<string>",
"toolDescription": "<string>"
}
}
],
"nextCursor": "<string>",
"totalCount": 123
}{
"message": "<string>",
"code": "<string>",
"issues": [
{}
]
}{
"message": "<string>",
"code": "<string>",
"issues": [
{}
]
}List flow versions
Lists the saved versions of a flow, newest first. A version is recorded when the flow is published, restored, imported, duplicated or saved by hand. Each one says when it was made, its origin, who made it and whether it came from restoring an older one (isRestored, restoredFromId).
hasDanglingReferences is true when a version has edges pointing at groups or blocks that no longer exist. Such a version is broken; do not restore it.
Each entry carries the version’s full content unless excludeContent is true, and that is large. List with excludeContent=true, then read one version with historyId. Page with nextCursor: pass it back as cursor until it is null.
curl --request GET \
--url https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history', 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.cloudhumans.com/typebot/v1/typebots/{flowId}/history",
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>"
],
]);
$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.cloudhumans.com/typebot/v1/typebots/{flowId}/history"
req, _ := http.NewRequest("GET", url, nil)
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.cloudhumans.com/typebot/v1/typebots/{flowId}/history")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudhumans.com/typebot/v1/typebots/{flowId}/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"history": [
{
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"origin": "PUBLISH",
"version": "<string>",
"isRestored": true,
"restoredFromId": "<string>",
"publishedAt": "2023-11-07T05:31:56Z",
"author": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"hasDanglingReferences": true,
"content": {
"name": "<string>",
"icon": "<string>",
"groups": [
{}
],
"edges": [
{}
],
"events": [
{}
],
"variables": [
{}
],
"settings": {},
"tenant": "<string>",
"toolDescription": "<string>"
}
}
],
"nextCursor": "<string>",
"totalCount": 123
}{
"message": "<string>",
"code": "<string>",
"issues": [
{}
]
}{
"message": "<string>",
"code": "<string>",
"issues": [
{}
]
}Authorizations
Path Parameters
The flow's internal id, e.g. clx9z8y7x6w5v4u3t2s1. Get it from List flows (the id field of each flow). It is NOT the publicId slug that appears in a flow's public URL: a slug answers 404 here. A flow your token cannot reach answers 404, indistinguishable from one that does not exist.
Query Parameters
Response
One page of snapshots, newest first.