Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/sessions/{session_id}/events
Retrieves the events in a session in chronological order (oldest first). Supports cursor-based pagination.
Path parameters
| Parameter | Type | Description |
|---|
session_id | string | Session ID with the sess_ prefix |
| Header | Required | Description |
|---|
Authorization | Yes | Bearer $QODER_PAT |
Query parameters
| Parameter | Type | Required | Description |
|---|
limit | integer | No | Maximum number of records to return. Default 20 |
after_id | string | No | Cursor pagination: return records after this event ID |
before_id | string | No | Cursor pagination: return records before this event ID |
Example request
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/sessions/sess_019e392c0d1e74e095d21ea4c6b41def/events?limit=5" \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 200 OK
{
"data": [
{
"id": "evt_019e392c0d787cfaa21bda98e06cd913",
"type": "user.message",
"content": "Hello, this is a test message.",
"session_id": "sess_019e392c0d1e74e095d21ea4c6b41def",
"turn_id": "turn_019e392c0d787ceea6bb62943f9ac3ec",
"schema_version": "1.0",
"created_at": "2026-05-18T03:40:48.888851795Z",
"processed_at": "2026-05-18T03:40:48.888851795Z"
},
{
"id": "evt_771c1195bcbd4a07834d4ed4dd6450ca",
"type": "session.status_rescheduled",
"session_id": "sess_019e392c0d1e74e095d21ea4c6b41def",
"turn_id": "turn_019e392c0d787ceea6bb62943f9ac3ec",
"schema_version": "1.0",
"created_at": "2026-05-18T03:40:50.321Z",
"processed_at": "2026-05-18T03:40:50.321Z"
}
],
"first_id": "evt_019e392c0d787cfaa21bda98e06cd913",
"last_id": "evt_771c1195bcbd4a07834d4ed4dd6450ca",
"has_more": true
}
Event type reference
| Type | Description | Specific fields |
|---|
user.message | User message | content (string) |
agent.message | Agent reply | content (ContentBlock[]) |
agent.thinking | Agent thinking | – |
session.status_rescheduled | Session scheduled for execution | – |
session.status_idle | Session returned to idle | usage, status, stop_reason |
session.error | Execution error | error, details, retry_status |
span.model_request_start | Model request started | – |
span.model_request_end | Model request ended | – |
terminated | Execution terminated | – |
agent.message content format
{
"content": [
{
"type": "text",
"text": "The agent's reply text."
}
]
}
{
"type": "session.status_idle",
"status": "idle",
"usage": {
"input_tokens": 150,
"output_tokens": 42,
"cache_read_input_tokens": 0,
"cache_creation_input_tokens": 0
},
"stop_reason": {
"type": "end_turn"
}
}
{
"type": "session.error",
"error": {
"message": "The operation was aborted due to timeout",
"type": "unknown_error"
},
"details": {
"message": "The operation was aborted due to timeout",
"name": "TimeoutError"
},
"retry_status": {
"type": "exhausted"
}
}
| Field | Type | Description |
|---|
data | array | List of event objects |
first_id | string | ID of the first record on the current page |
last_id | string | ID of the last record on the current page |
has_more | boolean | Whether more records are available |
Errors
| HTTP | Type | Trigger |
|---|
| 401 | authentication_error | PAT invalid or expired |
| 404 | not_found_error | Session does not exist |
See Errors for the full error envelope.