Subscribe to a Forward session event stream with SSE.
Request headers
|
Header |
Required |
Description |
|
|
Yes |
|
|
|
Yes |
|
|
|
No |
Resume after this Event ID. |
Path parameters
|
Parameter |
Type |
Required |
Description |
|
|
string |
Yes |
Session ID. |
Query parameters
|
Parameter |
Type |
Required |
Default |
Description |
|
|
string |
No |
- |
Filter by Event type. Comma-separated values are supported. |
|
|
string |
No |
- |
Array-style Event type filter. |
|
|
boolean |
No |
|
Include tool call events. |
|
|
boolean |
No |
|
Include thinking events. |
Example request
curl -N -X GET 'https://api.qoder.com.cn/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
|
Field |
Description |
|
|
SSE event ID. Equals the Event ID. |
|
|
Event type. |
|
|
Filtered Forward Event JSON. |
Errors
|
HTTP |
Type |
Code |
Trigger |
|
400 |
|
|
|
|
401 |
|
|
PAT invalid or expired. |
|
404 |
|
|
Session 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=falsefilters thinking events and recognizable thinking deltas. -
include_tool_calls=falsefilters tool-use events and recognizable tool input/output deltas.