Skip to main content

List session events

Paginated query of the event history for a Forward Session.

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path Parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID.

Query Parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo20Page size, maximum 100.
after_idstringNo-Returns events after this Event ID.
before_idstringNo-Returns events before this Event ID.
orderstringNoascSort direction: asc or desc.
typestringNo-Filter by Event type; supports comma-separated values.
types[]stringNo-Array-style Event type filter.
include_tool_callsbooleanNotrueWhether to include tool call events.
include_thinkingbooleanNotrueWhether to include thinking events.

Example Request

curl -s -X GET 'https://api.qoder.com.cn/api/v1/forward/sessions/sess_xxx/events' \
  -H "Authorization: Bearer $QODER_PAT"

Example Response

HTTP 200 OK
{
  "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"
    }
  ],
  "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 the current page.

last_id

string|null

ID of the last Event on the current page.

has_more

boolean

Whether more records remain.

Event Object Fields

FieldTypeDescription
idstringEvent ID.
typestringEvent type.
session_idstringSession ID.
processed_atstringEvent processing time; some events may not have this field.
contentarrayPresent for message-type events.

Allowed Payload Fields by Type

The fields in the table below do not include the common envelope fields id, type, session_id, processed_at.
Event typepayload fields
user.messagecontent, file_attachments
user.interruptreason, session_thread_id
user.tool_confirmationtool_use_id, result, deny_message, session_thread_id
user.tool_resulttool_use_id, content, is_error, session_thread_id
user.custom_tool_resultcustom_tool_use_id, content, is_error, session_thread_id
user.define_outcomedescription, rubric, outcome_id, max_iterations
system.messagecontent
agent.messagecontent
agent.thinkingNone
agent.message_startmessage_id, message
agent.content_block_startmessage_id, index, content_block
agent.content_block_deltamessage_id, index, delta
agent.content_block_stopmessage_id, index
agent.message_deltamessage_id, delta, usage
agent.message_stopmessage_id
agent.tool_usename, input, evaluated_permission, session_thread_id
agent.tool_resulttool_use_id, content, is_error
agent.custom_tool_usename, input, session_thread_id
agent.mcp_tool_usemcp_server_name, name, input, evaluated_permission, session_thread_id
agent.mcp_tool_resultmcp_tool_use_id, content, is_error
agent.artifact_deliveredfile_id, original_filename, size, content_type
session.status_runningNone
session.status_idlestop_reason
session.status_terminatedNone
session.errorerror
session.updatedagent, metadata, title
Unknown typeEnvelope only; runtime-private raw payload is not returned.

Errors

HTTPTypeCodeTrigger
400invalid_request_errorinvalid_event_cursorCursor does not belong to the current Session.
400invalid_request_errorinvalid_paginationPagination parameters are invalid.
404not_found_errorsession_not_foundSession does not exist.
401authentication_errorTOKEN_INVALIDPAT is invalid or has expired.

Notes

  • Unknown Event types do not cause the request to fail; they are returned with a minimal envelope when available.
  • Forward filters out runtime-private fields by default, including agent IDs, environment IDs, resources, vaults, worker, trace, and raw/debug/internal fields.