Skip to main content
GET /api/v1/forward/sessions/{session_id}/events/stream Streams session events as Server-Sent Events. The data payload uses the same Forward filtering model as the event history endpoint.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>
AcceptYestext/event-stream
Last-Event-IDNoResume after this Event ID.

Path parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID.

Query parameters

ParameterTypeRequiredDefaultDescription
typestringNo-Filter by Event type. Comma-separated values are supported.
types[]stringNo-Array-style Event type filter.
include_tool_callsbooleanNotrueInclude tool call events.
include_thinkingbooleanNotrueInclude thinking events.

Example request

curl -N -X GET 'https://api.qoder.com/api/v1/forward/sessions/sess_xxx/events/stream?include_thinking=false' \
  -H "Authorization: Bearer $QODER_PAT" \
  -H "Accept: text/event-stream"

Example response

HTTP 200 OK
id: evt_xxx
event: agent.message
data: {"id":"evt_xxx","type":"agent.message","session_id":"sess_xxx","content":[{"type":"text","text":"Here is the analysis result."}],"processed_at":"2026-06-22T11:00:03Z"}

Incremental streaming example

When the Session was created with incremental_streaming_enabled=true, the stream can include incremental events before the final agent.message.
id: evt_start_xxx
event: agent.message_start
data: {"id":"evt_start_xxx","type":"agent.message_start","session_id":"sess_xxx","message_id":"msg_xxx","created_at":"2026-06-22T11:00:01Z"}

id: evt_delta_xxx
event: agent.content_block_delta
data: {"id":"evt_delta_xxx","type":"agent.content_block_delta","session_id":"sess_xxx","message_id":"msg_xxx","index":0,"delta":{"type":"text_delta","text":"Here"},"created_at":"2026-06-22T11:00:01Z"}

Response fields

FieldDescription
idSSE event ID. Equals the Event ID.
eventEvent type.
dataFiltered Forward Event JSON. The payload fields follow the Event type matrix documented by List Session Events.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_event_cursorLast-Event-ID does not belong to this Session.
401authentication_errorauthentication_requiredPAT invalid or expired.
404not_found_errorsession_not_foundSession does not exist.

Notes

  • Incremental streaming is controlled by the Session create request and cannot be enabled with this endpoint.
  • Unknown Event types are forwarded as envelope-only events when available.
  • include_thinking=false filters thinking events and recognizable thinking deltas.
  • include_tool_calls=false filters tool-use events and recognizable tool input/output deltas.

Create a session

List session events