Report run activity
A daemon sends a batch of run events for the live timeline (phase started, input
required, run completed, …). They are stored, sent to everyone watching Stream run
activity, and lifecycle events update the run’s state. Events for a run CliqHub does not
know are dropped (dropped: true) so the daemon stops resending them.
Daemon push: requires the daemon’s realm token (cliq_dt_…) for the realm that owns the run given by run_id.
curl --request POST \
--url https://{host}/v1/runs/report_activity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"daemon_id": "7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"events": [
{
"event_type": "phase.completed",
"phase": "review",
"agent": "claude-code",
"payload_json": "{\"message\":\"3 findings\"}",
"created_at": 1759834480000
}
]
}
'import requests
url = "https://{host}/v1/runs/report_activity"
payload = {
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"daemon_id": "7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"events": [
{
"event_type": "phase.completed",
"phase": "review",
"agent": "claude-code",
"payload_json": "{\"message\":\"3 findings\"}",
"created_at": 1759834480000
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
run_id: '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
daemon_id: '7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d',
events: [
{
event_type: 'phase.completed',
phase: 'review',
agent: 'claude-code',
payload_json: '{"message":"3 findings"}',
created_at: 1759834480000
}
]
})
};
fetch('https://{host}/v1/runs/report_activity', 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://{host}/v1/runs/report_activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'run_id' => '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
'daemon_id' => '7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d',
'events' => [
[
'event_type' => 'phase.completed',
'phase' => 'review',
'agent' => 'claude-code',
'payload_json' => '{"message":"3 findings"}',
'created_at' => 1759834480000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/runs/report_activity"
payload := strings.NewReader("{\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"daemon_id\": \"7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d\",\n \"events\": [\n {\n \"event_type\": \"phase.completed\",\n \"phase\": \"review\",\n \"agent\": \"claude-code\",\n \"payload_json\": \"{\\\"message\\\":\\\"3 findings\\\"}\",\n \"created_at\": 1759834480000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/v1/runs/report_activity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"daemon_id\": \"7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d\",\n \"events\": [\n {\n \"event_type\": \"phase.completed\",\n \"phase\": \"review\",\n \"agent\": \"claude-code\",\n \"payload_json\": \"{\\\"message\\\":\\\"3 findings\\\"}\",\n \"created_at\": 1759834480000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/runs/report_activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"daemon_id\": \"7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d\",\n \"events\": [\n {\n \"event_type\": \"phase.completed\",\n \"phase\": \"review\",\n \"agent\": \"claude-code\",\n \"payload_json\": \"{\\\"message\\\":\\\"3 findings\\\"}\",\n \"created_at\": 1759834480000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"count": 1,
"replay": false
}{
"ok": false,
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"ok": false,
"error": {
"code": "forbidden",
"message": "You do not have access to do this"
}
}{
"ok": false,
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"ok": false,
"error": "Required",
"code": "invalid_params",
"details": {
"issues": [
{
"field": "run_id",
"message": "Required"
}
]
}
}{
"ok": false,
"error": "Internal server error",
"code": "internal_error"
}Authorizations
User PAT (cliq_tok_…, including session-scoped) or realm token (cliq_dt_…).
Body
The run.
1Events, each with event_type, created_at (epoch milliseconds), and optionally phase, agent and payload_json (a JSON string).
Show child attributes
Show child attributes
The reporting daemon.
The run's realm, when known.
true when resending events after a reconnect.
curl --request POST \
--url https://{host}/v1/runs/report_activity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"daemon_id": "7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"events": [
{
"event_type": "phase.completed",
"phase": "review",
"agent": "claude-code",
"payload_json": "{\"message\":\"3 findings\"}",
"created_at": 1759834480000
}
]
}
'import requests
url = "https://{host}/v1/runs/report_activity"
payload = {
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"daemon_id": "7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
"events": [
{
"event_type": "phase.completed",
"phase": "review",
"agent": "claude-code",
"payload_json": "{\"message\":\"3 findings\"}",
"created_at": 1759834480000
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
run_id: '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
daemon_id: '7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d',
events: [
{
event_type: 'phase.completed',
phase: 'review',
agent: 'claude-code',
payload_json: '{"message":"3 findings"}',
created_at: 1759834480000
}
]
})
};
fetch('https://{host}/v1/runs/report_activity', 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://{host}/v1/runs/report_activity",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'run_id' => '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
'daemon_id' => '7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d',
'events' => [
[
'event_type' => 'phase.completed',
'phase' => 'review',
'agent' => 'claude-code',
'payload_json' => '{"message":"3 findings"}',
'created_at' => 1759834480000
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/runs/report_activity"
payload := strings.NewReader("{\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"daemon_id\": \"7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d\",\n \"events\": [\n {\n \"event_type\": \"phase.completed\",\n \"phase\": \"review\",\n \"agent\": \"claude-code\",\n \"payload_json\": \"{\\\"message\\\":\\\"3 findings\\\"}\",\n \"created_at\": 1759834480000\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{host}/v1/runs/report_activity")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"daemon_id\": \"7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d\",\n \"events\": [\n {\n \"event_type\": \"phase.completed\",\n \"phase\": \"review\",\n \"agent\": \"claude-code\",\n \"payload_json\": \"{\\\"message\\\":\\\"3 findings\\\"}\",\n \"created_at\": 1759834480000\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/runs/report_activity")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"daemon_id\": \"7d1c2b3a-4e5f-4a6b-8c7d-9e0f1a2b3c4d\",\n \"events\": [\n {\n \"event_type\": \"phase.completed\",\n \"phase\": \"review\",\n \"agent\": \"claude-code\",\n \"payload_json\": \"{\\\"message\\\":\\\"3 findings\\\"}\",\n \"created_at\": 1759834480000\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"count": 1,
"replay": false
}{
"ok": false,
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}{
"ok": false,
"error": {
"code": "forbidden",
"message": "You do not have access to do this"
}
}{
"ok": false,
"error": {
"code": "not_found",
"message": "Not found"
}
}{
"ok": false,
"error": "Required",
"code": "invalid_params",
"details": {
"issues": [
{
"field": "run_id",
"message": "Required"
}
]
}
}{
"ok": false,
"error": "Internal server error",
"code": "internal_error"
}