Threads

Create a thread

Create a thread with an initial message and optionally wait for the agent response.

post/threads

Request body

projectIdstring uuid

Project to create the thread in. Auto-filled from CLI and SDK context when omitted.

messagestring required

Initial user message that starts the thread.

waitboolean

Whether the server should wait for the agent run before responding.

timeoutSecondsinteger

Maximum seconds to wait when wait is true before handing off to polling.

automationIdstring uuid

Internal automation context. Set by the Sazabi CLI when an automation script starts an agent run.

{"stackTrail":"paths:/threads:post:requestBody:content:application/json:schema:properties:ambientServiceRun","oasType":"schema","type":"unknown","description":"Internal marker for scheduler-originated ambient service work. Honored only for system secret-key requests with matching automation context."}

Response

OK

completedboolean required

Whether the run has reached a terminal status.

threadIdstring uuid required

Thread ID associated with the run.

runIdstring uuid required

Run ID for subsequent polling.

messageIdstring uuid

ID of the user message that triggered this run.

status'processing' | 'completed' | 'aborted' | 'error' required

Current run lifecycle status.

responsestring nullable required

Assistant response text when the run has completed.

Changes

No recorded changes to this endpoint across all 4 revisions of this API.