curl --request GET \
--url https://api.{domain}/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.{domain}/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.{domain}/v1/events', 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.{domain}/v1/events",
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.{domain}/v1/events"
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.{domain}/v1/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{domain}/v1/events")
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{
"object": "event",
"type": "<string>",
"session_id": "<string>",
"created_at": 123,
"internal_type": "<string>",
"seq": 123,
"payload": {}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}Stream every session's events
Stream every session the organization owns.
curl --request GET \
--url https://api.{domain}/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.{domain}/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.{domain}/v1/events', 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.{domain}/v1/events",
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.{domain}/v1/events"
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.{domain}/v1/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.{domain}/v1/events")
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{
"object": "event",
"type": "<string>",
"session_id": "<string>",
"created_at": 123,
"internal_type": "<string>",
"seq": 123,
"payload": {}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
A gbr_pat_ access token. Scopes are recorded on the token when it is minted.
Query Parameters
Replay durable events after this seq. The Last-Event-ID header does the same thing.
x >= 0Response
Stream every session the organization owns.
A server-sent event. The response is text/event-stream, not JSON; this describes one frame's data.
Always event. Names the shape, so a value can be identified without knowing which call returned it.
"event"The event's name. See events.md for the vocabulary.
The session it happened in.
Unix milliseconds.
The control plane's own name for the event, for cross-referencing logs.
Cursor for Last-Event-ID. Null on a transient event, which does not advance it.
Everything specific to this event type. Not one shape ā examples below carries a real payload for every type in the vocabulary, keyed by the type. Read the one you are handling rather than probing for fields: agent.tool_call carries toolName and args, not name and arguments, and guessing that pair wrong renders every tool call as an empty object.
{
"turn.started": { "turnId": "turn_1bdef0a94c2e47f3" },
"turn.ended": { "turnId": "turn_1bdef0a94c2e47f3" },
"agent.text": { "delta": "Looking at the export handler" },
"agent.thinking": {
"delta": "The error rate started at 09:12"
},
"agent.message": {
"text": "I found the regression in export-svc v2.3.2."
},
"agent.tool_call": {
"toolCallId": "call_53ce8a1f",
"toolName": "write",
"args": {
"path": "/workspace/outputs/report.md",
"content": "# Report"
}
},
"agent.tool_result": {
"toolCallId": "call_53ce8a1f",
"toolName": "write",
"isError": false,
"cancelled": false,
"summary": "Successfully wrote 5 bytes"
},
"agent.compaction": { "before": 182000, "after": 41000 },
"agent.error": {
"message": "the model provider returned 502"
},
"agent.todos": {
"items": [
{
"label": "Read the alert",
"status": "done"
},
{
"label": "Write the postmortem",
"status": "pending"
}
]
},
"user.message": {
"text": "Alert A-4471: export error rate 12%."
},
"message.queued": {
"text": "Also check the retry queue.",
"position": 1
},
"message.dequeued": { "text": "Also check the retry queue." },
"file.changed": {
"path": "/workspace/src/export.ts",
"kind": "modified",
"diff": "@@ -1,3 +1,4 @@\nā¦"
},
"approval.requested": {
"toolCallId": "call_9a1f20bd",
"name": "bash",
"args": { "command": "systemctl restart export" },
"sensitive": true
},
"approval.resolved": {
"toolCallId": "call_9a1f20bd",
"approved": true
},
"question.asked": {
"toolCallId": "call_7be1c4d0",
"question": "Roll back or patch forward?",
"options": ["roll back", "patch"],
"allowFreeform": true
},
"question.answered": {
"toolCallId": "call_7be1c4d0",
"answer": "roll back"
},
"tool.required": {
"toolCallId": "call_4f01aa27",
"name": "lookup_order",
"arguments": { "order_id": "A-4471" }
},
"tool.resolved": {
"toolCallId": "call_4f01aa27",
"name": "lookup_order",
"success": true
},
"sandbox.created": { "state": "running" },
"sandbox.paused": { "state": "paused" },
"sandbox.resumed": { "state": "running" },
"preview.ready": {
"port": 3000,
"url": "https://p-4f1c8e02a7b1.gobare.dev"
},
"workspace.recovery_failed": {
"message": "no snapshot was available for this workspace"
},
"artifact.created": {
"id": "art_6f2a9c41",
"path": "/workspace/outputs/report.md",
"size_bytes": 482,
"turn_id": "turn_1bdef0a94c2e47f3"
},
"mcp.unavailable": {
"name": "runbook",
"reason": "the server did not answer within 10s"
},
"gobare.replay_truncated": {
"from_seq": 91204,
"note": "More than 50000 events were waiting."
}
}