curl --request GET \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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{
"session": {
"session_policy": {
"version": 1,
"mode": "standard",
"components": {
"memoryRead": true,
"memoryWrite": true,
"skills": true,
"inheritedInstructions": true,
"integrations": true,
"secretInjection": true
},
"workspaceOwnership": "managed",
"personalContext": false,
"pullRequestPolicy": "draft_only"
},
"session_id": "<string>",
"status": "running",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"benchmark_profile": "coding-benchmark-v1",
"runtime_profile": "runtime/reason-sync-yield-v1",
"experimental_runtime_profile": "runtime/reason-c2-tools-v7",
"experimental_runtime_features": [
"banner"
],
"origin": "ui",
"origin_agent": "<string>",
"agent_identity_source": "self_reported",
"suspended_reason": "cancelled",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"prompt": "<string>",
"prompt_truncated": true,
"prompt_bytes": 123,
"tags": [
"<string>"
],
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason_id": "<string>",
"created_by_session_id": "<string>",
"automation_id": "<string>",
"target": {
"kind": "cloud"
},
"machine": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state": "waiting",
"queue_position": 123,
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enqueued_at": "<string>",
"placed_at": "<string>"
},
"repo": "<string>",
"provider": "github",
"model": "<string>",
"reason_version": "<string>",
"reason_commit_sha": "<string>",
"reasoning_effort": "<string>",
"hands_mode": "adaptive",
"branch": "<string>",
"branch_has_commits": true,
"pr_url": "<string>",
"pr_title": "<string>",
"result_summary": "<string>",
"outcome": "success",
"result": "<unknown>",
"blocker": "<string>",
"failure": {
"category": "<string>",
"title": "<string>",
"message": "<string>",
"resolution": "retry",
"actions": [
{
"label": "<string>",
"url": "<string>"
}
]
},
"error_class": "<string>",
"usage_limit_resume": {
"resumes_at": "2023-11-07T05:31:56Z"
},
"error_message": "<string>",
"failure_diagnostics": {
"failure_stage": "<string>",
"reason_code": "<string>",
"root_cause": "<string>"
},
"failure_stage": "<string>",
"reason_code": "<string>",
"root_cause": "<string>",
"previous_attempt_failure": {
"attempt_id": "<string>",
"status": "<string>",
"error_class": "<string>",
"failure_stage": "<string>",
"reason_code": "<string>",
"root_cause": "<string>",
"finished_at": "<string>"
},
"diagnostic_message": "<string>",
"duration_ms": 123,
"cost_usd": 123,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123
},
"context": {
"tokens": 123,
"window": 123,
"percent": 123
},
"is_archived": true,
"session_type": "session",
"source_session_id": "<string>",
"read_only": true,
"repos": [
"<string>"
],
"change_requests": [
{
"url": "<string>",
"status": "active"
}
]
},
"items": [
{
"seq": 123,
"id": "<string>",
"position": 123,
"type": "<string>",
"text": "<string>",
"data": {
"stream_key": "<string>",
"item_id": "<string>",
"tool": "<string>",
"name": "<string>",
"tool_use_id": "<string>",
"input": "<unknown>",
"content": "<string>",
"stage": "<string>",
"is_error": true,
"is_partial": true,
"duration_ms": 123
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"next_seq": 123
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}List live session events
Poll incremental agent activity. Paging: pass the previous next_seq as after_seq to receive only newer events, until items is empty. Add wait_ms to have a poll that finds nothing new wait for the next event of a running session instead of returning at once. Order: seq is the delivery cursor, not the order things happened in. A streamed event (a reply, reasoning, a tool’s live output) keeps its id and reappears with a higher seq each time its snapshot grows, so by seq it can be listed after events that happened later, and a poller can receive the same id in more than one page. To read the transcript, keep the copy of each id with the highest seq and sort by position: the seq the event first appeared at, which never changes and is unique in the Session. Numbers: seq and position are the Attempt’s number times 4294967296 (2^32) plus a counter inside that Attempt. They jump by about 4.29 billion whenever a follow-up, a retry or a machine change starts a new Attempt, and they have gaps where an event is hidden from this projection or a streamed event moved on from an earlier snapshot; compare them, never count with them. Content: view=conversation returns only assistant, reasoning, tool_use and tool_result events, for any caller, and leaves the cursor unchanged. In the debug projection a streamed event’s data.stream_position_seq is its position and data.stream_revision is the counter part of its current seq. There, a result event’s data.run_status is the internal lifecycle status of the execution Attempt that produced it (succeeded means it ran to completion, which the session reports as status exit); it is not the task verdict, which is the session’s outcome. Without view, sessions:read returns status events with null text/data, plus assistant, reasoning, tool_use and tool_result events with their text and a fixed set of data fields (tool, tool_use_id, input, content, is_error, is_partial, duration_ms, stream_key, item_id). An organization owner/admin may add sessions:debug for the full diagnostic projection: diagnostic event kinds, status text and raw event metadata.
sessions:read or sessions:debugcurl --request GET \
--url https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reasonmachines.com/v3/organizations/{orgId}/sessions/{sessionId}/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{
"session": {
"session_policy": {
"version": 1,
"mode": "standard",
"components": {
"memoryRead": true,
"memoryWrite": true,
"skills": true,
"inheritedInstructions": true,
"integrations": true,
"secretInjection": true
},
"workspaceOwnership": "managed",
"personalContext": false,
"pullRequestPolicy": "draft_only"
},
"session_id": "<string>",
"status": "running",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"benchmark_profile": "coding-benchmark-v1",
"runtime_profile": "runtime/reason-sync-yield-v1",
"experimental_runtime_profile": "runtime/reason-c2-tools-v7",
"experimental_runtime_features": [
"banner"
],
"origin": "ui",
"origin_agent": "<string>",
"agent_identity_source": "self_reported",
"suspended_reason": "cancelled",
"started_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"prompt": "<string>",
"prompt_truncated": true,
"prompt_bytes": 123,
"tags": [
"<string>"
],
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason_id": "<string>",
"created_by_session_id": "<string>",
"automation_id": "<string>",
"target": {
"kind": "cloud"
},
"machine": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"state": "waiting",
"queue_position": 123,
"device_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enqueued_at": "<string>",
"placed_at": "<string>"
},
"repo": "<string>",
"provider": "github",
"model": "<string>",
"reason_version": "<string>",
"reason_commit_sha": "<string>",
"reasoning_effort": "<string>",
"hands_mode": "adaptive",
"branch": "<string>",
"branch_has_commits": true,
"pr_url": "<string>",
"pr_title": "<string>",
"result_summary": "<string>",
"outcome": "success",
"result": "<unknown>",
"blocker": "<string>",
"failure": {
"category": "<string>",
"title": "<string>",
"message": "<string>",
"resolution": "retry",
"actions": [
{
"label": "<string>",
"url": "<string>"
}
]
},
"error_class": "<string>",
"usage_limit_resume": {
"resumes_at": "2023-11-07T05:31:56Z"
},
"error_message": "<string>",
"failure_diagnostics": {
"failure_stage": "<string>",
"reason_code": "<string>",
"root_cause": "<string>"
},
"failure_stage": "<string>",
"reason_code": "<string>",
"root_cause": "<string>",
"previous_attempt_failure": {
"attempt_id": "<string>",
"status": "<string>",
"error_class": "<string>",
"failure_stage": "<string>",
"reason_code": "<string>",
"root_cause": "<string>",
"finished_at": "<string>"
},
"diagnostic_message": "<string>",
"duration_ms": 123,
"cost_usd": 123,
"usage": {
"input_tokens": 123,
"output_tokens": 123,
"total_tokens": 123
},
"context": {
"tokens": 123,
"window": 123,
"percent": 123
},
"is_archived": true,
"session_type": "session",
"source_session_id": "<string>",
"read_only": true,
"repos": [
"<string>"
],
"change_requests": [
{
"url": "<string>",
"status": "active"
}
]
},
"items": [
{
"seq": 123,
"id": "<string>",
"position": 123,
"type": "<string>",
"text": "<string>",
"data": {
"stream_key": "<string>",
"item_id": "<string>",
"tool": "<string>",
"name": "<string>",
"tool_use_id": "<string>",
"input": "<unknown>",
"content": "<string>",
"stage": "<string>",
"is_error": true,
"is_partial": true,
"duration_ms": 123
},
"created_at": "2023-11-07T05:31:56Z"
}
],
"next_seq": 123
}{
"error": "missing_bearer",
"message": "Authorization required"
}{
"error": "missing_scope",
"required_scope": "sessions:read"
}{
"error": "session_not_found"
}{
"error": {
"type": "rate_limited",
"message": "This API key exceeded its request-rate limit"
}
}Authorizations
Your Reason API key from Settings › API keys. New keys use reason_; legacy ara_ keys remain accepted. Keys are capability-scoped: run, mcp:read, mcp:write, secrets:read, secrets:write, sessions:read, sessions:debug, knowledge:read, memory:read, memory:write, skills:read, skills:write, repos:read, repos:write, reviews:read, reviews:write, deployment:read, analytics:read, org:read, org:write, attachments:read, attachments:write, guardrails:read, guardrails:write, network:read, network:write, automations:read, automations:write, agent_auth:read. network:read and network:write are opt-in, excluded from default keys. network:read reads the saved workspace network policy; network:write replaces custom allowed hosts and requires a current organization owner/admin. Legacy project PATCH requests containing network_allowed_hosts also require network:write plus their existing run scope and project management permission; saved project hosts do not affect current session egress. Only owners/admins can mint or manage keys with network:write; keys cannot grant themselves more authority. See /docs/network-policies for replacement semantics and runtime applicability. mcp:write manages MCP server configuration only; it does not authorize remote MCP-tool execution. sessions:read reads sessions, including the assistant, reasoning and tool activity in their events. sessions:debug is privileged: only for organization owners/admins, it expands session events to the full diagnostic projection (diagnostic event kinds, status text and raw event metadata).
Path Parameters
Organization id or slug. Resolve it with GET /v3/self.
The session id, returned as session_id by createSession and listSessions.
Query Parameters
Return only events whose seq is higher than this value: pass the previous response's next_seq, or -1 (the default) to start before the first event. Use it as a cursor to compare, not a count: seq is the Attempt's number times 4294967296 plus a counter inside that Attempt, so it jumps by about 4.29 billion whenever a follow-up, a retry or a machine change starts a new Attempt, and it has gaps. seq is delivery order; sort by each event's position for the order things happened in.
conversation returns only what was said and done: assistant, reasoning, tool_use and tool_result events with their text and the fixed data fields, and no status, tracing or diagnostic events, whatever the caller's scopes. Omit it for the caller's full projection. Both use the same cursor, so a next_seq from one is a valid after_seq for the other. With wait_ms, the wait passes over events the view does not list.
conversation Most events one page returns, 1 to 1000 (other values return 400); a busy Session takes several pages, read on with next_seq.
When no event follows after_seq and the session is running, the server may wait up to this many milliseconds (max 20000) for one before responding. It may also answer immediately, and a response may carry no events; poll again with the same cursor.
Response
The current session plus a bounded page of live events.
session is the current lifecycle snapshot. Without sessions:debug held by an organization owner/admin, it includes Session identity, status, timestamps, resolved session_policy, error_class, duration_ms, cost_usd and usage, and excludes prompt, result content and diagnostic context.

