Runs
Watch a run live
Starts live updates for a run and returns where to watch it over Statewire: the state is {"execution": <the run>, "observedAt": <unix ms>} and changes each time a step finishes. The token admits new watchers for an hour; an attachment lasts up to 24 hours.
POST
/
api
/
executions
/
{id}
/
live
Watch a run live
curl --request POST \
--url https://api.hitl.sh/v1/api/executions/{id}/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hitl.sh/v1/api/executions/{id}/live"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hitl.sh/v1/api/executions/{id}/live', 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.hitl.sh/v1/api/executions/{id}/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.hitl.sh/v1/api/executions/{id}/live"
req, _ := http.NewRequest("POST", 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.post("https://api.hitl.sh/v1/api/executions/{id}/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hitl.sh/v1/api/executions/{id}/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": false,
"msg": "Live updates started",
"data": {
"id": "6af2cf07c6a9f1dc71efd5e7",
"workflow_id": "6af2ce4e8207961501f59472",
"status": "pending_review",
"finished": false,
"live": {
"url": "https://live.hitl.sh/r/6af2cf07c6a9f1dc71efd5e7",
"token": "eyJhbGciOi…",
"expires_at": "2026-11-10T09:00:08Z",
"protocol": "hitl-run",
"protocol_version": "2026-11-03"
}
}
}{
"error": true,
"msg": "Invalid API key"
}{
"error": true,
"msg": "Workflow not found"
}⌘I
Watch a run live
curl --request POST \
--url https://api.hitl.sh/v1/api/executions/{id}/live \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hitl.sh/v1/api/executions/{id}/live"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hitl.sh/v1/api/executions/{id}/live', 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.hitl.sh/v1/api/executions/{id}/live",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.hitl.sh/v1/api/executions/{id}/live"
req, _ := http.NewRequest("POST", 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.post("https://api.hitl.sh/v1/api/executions/{id}/live")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hitl.sh/v1/api/executions/{id}/live")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"error": false,
"msg": "Live updates started",
"data": {
"id": "6af2cf07c6a9f1dc71efd5e7",
"workflow_id": "6af2ce4e8207961501f59472",
"status": "pending_review",
"finished": false,
"live": {
"url": "https://live.hitl.sh/r/6af2cf07c6a9f1dc71efd5e7",
"token": "eyJhbGciOi…",
"expires_at": "2026-11-10T09:00:08Z",
"protocol": "hitl-run",
"protocol_version": "2026-11-03"
}
}
}{
"error": true,
"msg": "Invalid API key"
}{
"error": true,
"msg": "Workflow not found"
}