Run an AI action as a seeded chat turn
POST
/api/v1/chat/sessions/{sessionId}/run-action/stream
const url = 'https://app.avera.io/api/v1/chat/sessions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/run-action/stream';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"actionSlug":"example","sourceItemId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","actionLabel":"example","supersedesBatchId":"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/run-action/stream \ --header 'Content-Type: application/json' \ --data '{ "actionSlug": "example", "sourceItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "actionLabel": "example", "supersedesBatchId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'The click-run path: the action runs directly as a seeded turn rather than being chosen by the chat model, but streams the same events a model-driven tool call would, so it renders through the normal conversation path. The emitted PENDING proposal batch is reviewed in the Changes panel; a human accepts proposals, nothing is written directly.
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
actionSlug
required
string
sourceItemId
required
string format: uuid
actionLabel
string | null
supersedesBatchId
string | null format: uuid
Example generated
{ "actionSlug": "example", "sourceItemId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "actionLabel": "example", "supersedesBatchId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”OK
Media typetext/event-stream
object
timeout
integer format: int64