Skip to main content
GET /api/v1/forward/sessions/{session_id}/events Returns session events with cursor pagination and field-level filtering. If incremental streaming is enabled for the Session, generated incremental events are also included.

Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT>

Path parameters

ParameterTypeRequiredDescription
session_idstringYesSession ID.

Query parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo20Items per page. Maximum 100.
after_idstringNo-Cursor for events after the given Event ID.
before_idstringNo-Cursor for 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/api/v1/forward/sessions/sess_xxx/events?limit=20&order=asc' \
  -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

FieldTypeDescription
dataarrayEvent objects on the current page.
first_idstring|nullID of the first event on this page.
last_idstring|nullID of the last event on this page.
has_morebooleanWhether more records remain.

Event fields

FieldTypeDescription
idstringEvent ID.
typestringEvent type.
session_idstringSession ID.
processed_atstringProcessing timestamp when available.
contentarrayReturned for message-like events.

Event payload fields by type

The table below lists allowed payload fields in addition to the common envelope fields id, type, session_id, and 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 this Session.
400invalid_request_errorinvalid_paginationPagination parameters are invalid.
401authentication_errorauthentication_requiredPAT invalid or expired.
404not_found_errorsession_not_foundSession does not exist.

Notes

  • Unknown Event types do not fail the request. They are returned with the minimal envelope when available.
  • Forward filters runtime-private fields such as agent IDs, environment IDs, resources, vaults, worker IDs, traces, and raw/debug/internal payloads.

Send session events

Stream session events