sinceEventId cursor on subsequent polls. Passing the ID of the last event you received means the response only includes new events, keeping payloads small as conversations grow.
Request
The ID of the session whose transcript you want to fetch.
Optional cursor for delta polling. When provided, the response only includes events that occurred after the event with this ID. Use the
id of the last event in the previous response as your cursor. Omit on the first request to receive the full transcript.Response
The session title, derived from the opening message.
The workflow run ID for the active background execution.
null when no workflow is running (the session is idle or terminated).Ordered array of event objects (ascending by
occurredAt). Empty when no new events have arrived since sinceEventId.true when there are additional events beyond the current page. Poll again — without advancing sinceEventId — to fetch the next page.true when Knoq attempted to load an older session’s history but the operation was incomplete (for example, due to a very large event log). The events returned are partial. Continue polling — each subsequent request resumes loading from where the previous one left off.Event types
| Type | Description |
|---|---|
user_message | A message sent by the user. |
agent_message | A response produced by the AI agent. |
tool_use | The agent invoked a connected tool (e.g. searched Slack or queried a GitHub repo). |
tool_result | The result returned by a tool call. |
status_idle | The agent has finished processing the current turn and is waiting for a follow-up. This is a terminal event for the current turn. |
status_terminated | The session has ended permanently (workflow exited or session cancelled). |
error | An error occurred during processing. The payload contains details. |
Example
Delta polling example
After receiving the response above, pass the last event’sid as sinceEventId on subsequent polls:
Errors
| Status | Meaning |
|---|---|
400 | The sessionId parameter is missing, empty, or malformed. The sinceEventId cursor, if provided, must be alphanumeric (with hyphens and underscores), up to 128 characters. |
401 | The request is not authenticated. Ensure your session cookie is valid and has not expired. |
404 | No session with the given ID was found for your user and organisation. |