Skip to main content
GET /v1/sessions/{session_id}/threads/{thread_id}/events Retrieves events for a specific session thread in chronological order. Only returns events belonging to that thread; events from other threads are excluded. Supports cursor-based pagination. If the request Accept header includes text/event-stream, this same route switches to SSE streaming. Use Accept: application/json or omit the SSE media type when you want a list response.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path Parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID (sess_ prefix)
thread_idstringYesThread ID (sthr_ prefix)

Query Parameters

ParameterTypeRequiredDescription
limitintegerNoMaximum number of records to return. Default 20
after_idstringNoCursor pagination: return records after this event ID
before_idstringNoCursor pagination: return records before this event ID
orderstringNoSort direction: asc (default) or desc
typestringNoFilter by event type. Supports comma-separated values
types[]stringNoArray-style alternative to type
See Pagination for the full pagination specification.

Example Request

curl -X GET "https://api.qoder.com/api/v1/cloud/sessions/sess_019f00000000000000000000000000aa/threads/sthr_019f00000000000000000000000002bb/events?limit=10" \
  -H "Authorization: Bearer $QODER_PAT"

Example Response

HTTP 200 OK
{
  "data": [
    {
      "id": "evt_019f0000000000000000000000000101",
      "type": "agent.thread_message_sent",
      "schema_version": "1.0",
      "session_id": "sess_019f00000000000000000000000000aa",
      "session_thread_id": "sthr_019f00000000000000000000000002bb",
      "turn_id": "turn_019f0000000000000000000000000010",
      "direction": "coordinator_to_child",
      "content": "请调研 Cloud Agents API 的最新竞品动态。",
      "from_session_thread_id": "sthr_019f00000000000000000000000001aa",
      "to_session_thread_id": "sthr_019f00000000000000000000000002bb",
      "created_at": "2026-06-15T08:01:00.000Z",
      "processed_at": "2026-06-15T08:01:00.000Z"
    },
    {
      "id": "evt_019f0000000000000000000000000102",
      "type": "session.thread_status_running",
      "schema_version": "1.0",
      "session_id": "sess_019f00000000000000000000000000aa",
      "session_thread_id": "sthr_019f00000000000000000000000002bb",
      "agent_name": "Research Agent",
      "status": "running",
      "created_at": "2026-06-15T08:01:01.000Z",
      "processed_at": "2026-06-15T08:01:01.000Z"
    }
  ],
  "first_id": "evt_019f0000000000000000000000000101",
  "last_id": "evt_019f0000000000000000000000000102",
  "has_more": true
}

Response Fields

FieldTypeDescription
dataarray of Event objectList of events for this thread. All events include a session_thread_id field
first_idstring | nullID of the first record on the current page
last_idstring | nullID of the last record on the current page
has_morebooleanWhether more records are available

Errors

HTTPTypeTrigger
401authentication_errorPAT invalid or expired
404not_found_errorSession or Thread does not exist
See Errors for full error envelope reference.

Managed Agents

Understand thread event semantics in multi-agent collaboration.

Stream Thread Events (SSE)

Receive thread events in real time via Server-Sent Events.

List Session Threads

View all threads in a session.