Send a message and stream the turn
POST
/api/v1/chat/sessions/{sessionId}/messages/stream
const url = 'https://app.avera.io/api/v1/chat/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages/stream';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"content":"example","refinesActionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","refinesConfigActionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://app.avera.io/api/v1/chat/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/messages/stream \ --header 'Content-Type: application/json' \ --data '{ "content": "example", "refinesActionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "refinesConfigActionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Runs the agent turn and returns a text/event-stream channel of JSON-encoded events, each tagged with its type. Message turns are streaming-only: there is deliberately no non-streaming twin. Events are id-stamped so a client that loses the connection can re-attach through the resume endpoint; messages persist server-side regardless.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”sessionId
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
content
required
string
refinesActionId
string | null format: uuid
refinesConfigActionId
string | null format: uuid
Example generated
{ "content": "example", "refinesActionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "refinesConfigActionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”OK
Media typetext/event-stream
object
timeout
integer format: int64