mosoodocs

Stream Thread events

Streams public Thread event log entries as Server-Sent Events. Each `thread.event` data payload uses the same ThreadEventLogEntry shape as GET /threads/{thre…

GET/threads/{threadId}/events/stream

Streams public Thread event log entries as Server-Sent Events. Each thread.event data payload uses the same ThreadEventLogEntry shape as GET /threads/{threadId}/events. Events are emitted by stable event ID and the stream suppresses duplicate IDs observed during polling. The stream is for long-running consumer UX and does not expose raw runtime payloads, internal diagnostics, or private transcripts.

Authorization

publicApiBearer
AuthorizationBearer <token>

Use Authorization: Bearer mst_... . API tokens identify an account and do not carry scopes.

In: header

Path Parameters

threadId*string

Thread ID returned by create thread. v1 IDs are bare ULIDs.

Match^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
Formatulid

Query Parameters

limit?integer

Maximum number of latest Thread events to return.

Range1 <= value <= 1000
Default100

Response Body

text/event-stream

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/threads/01J00000000000000000000009/events/stream?limit=100"
": connected\n\nevent: thread.event\nid: 01J00000000000000000000010\ndata: {\"id\":\"01J00000000000000000000010\",\"runId\":\"01J0000000000000000000000A\",\"type\":\"run.started\",\"status\":\"available\",\"content\":\"01J0000000000000000000000A\",\"occurredAt\":\"2026-05-19T00:00:01.000Z\",\"durationMs\":null,\"tokens\":null}\n\n"
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}