Skip to main content

List thread events

List event history for one Thread in a Forward Session.

Request headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID.
thread_idstringYesThread ID.

Query parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo20Items per page. Maximum 100.
after_idstringNo-Returns events after the given Event ID.
before_idstringNo-Returns events before the given Event ID.
orderstringNoascSort order: asc or desc.
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 -s -X GET 'https://api.qoder.com.cn/api/v1/forward/sessions/sess_xxx/threads/sthr_child_xxx/events' \
  -H "Authorization: Bearer $QODER_PAT"

Example response

HTTP 200 OK
{
  "data": [
    {
      "id": "evt_xxx",
      "type": "agent.message",
      "session_id": "sess_xxx",
      "session_thread_id": "sthr_child_xxx",
      "content": [
        {
          "type": "text",
          "text": "The child task is complete."
        }
      ],
      "processed_at": "2026-06-22T11:05:00Z"
    }
  ],
  "first_id": "evt_xxx",
  "last_id": "evt_xxx",
  "has_more": false
}

Response fields

Field

Type

Description

data

array

Event objects on the current page.

first_id

string|null

ID of the first event on this page.

last_id

string|null

ID of the last event on this page.

has_more

boolean

Whether more records remain.

Thread Event fields

Each item in data[] uses the same filtered Forward Event object as List Session Events. Thread-related events include session_thread_id in the public payload. See List Session Events for the complete Event type dispatch matrix.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_event_cursorCursor does not belong to this Thread.
400invalid_request_errorinvalid_paginationPagination parameters are invalid.
404not_found_errorsession_not_foundSession does not exist.
404not_found_errorthread_not_foundThread does not exist.
401authentication_errorauthentication_requiredPAT invalid or expired.

Notes

  • Thread Event responses use the same stable payload whitelist as Session Event responses.
  • Session-level Event Stream includes all Thread events; this endpoint returns only events for the specified Thread.