Read append-only session events
1 min read
Query Parameters
Session id whose events should be returned. Requests without it fail with 400 invalid_request.
Preferred cursor. Returns events with seq > afterSeq; pass
nextCursor.afterSeq from the previous page to resume reading.
Takes precedence over afterEventId when both are supplied.
Non-integer values fail with 400 invalid_request.
0 <= valueCompatibility cursor for clients that stored event ids instead of
sequence numbers. The daemon resolves the id to its sequence position
and returns events after it. Ignored when afterSeq is also
supplied; unknown ids read from the start of the log.
Maximum number of events to return. Out-of-range values are clamped
to 1–1000 rather than rejected; non-integer values fail with
400 invalid_request. When omitted, all events after the cursor are
returned in one page. hasMore in the response is only meaningful
when a limit is set — it is true when the page filled the limit.
1 <= value <= 1000Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/events?sessionId=session-1"{
"events": [
{
"seq": 42,
"id": "event-1",
"session_id": "session-1",
"kind": "output",
"payload_json": "{\"data\":\"hello\"}",
"created_at": "2026-05-09T06:43:10.000Z"
}
],
"nextCursor": {
"afterSeq": 42
},
"hasMore": false
}{
"error": {
"code": "invalid_request",
"message": "Required field \"sessionId\" is missing.",
"details": {
"field": "sessionId"
}
}
}{
"error": {
"code": "session_not_found",
"message": "Session was not found.",
"details": {
"sessionId": "session-1"
}
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected internal daemon error.",
"details": {}
}
}Last updated on