Threads
Conversations, who they are shared with, and their live event stream.
List threads
Returns the conversations the caller can see — their own, plus any shared with them or with a space they belong to. Context-agent threads are excluded unless thread_type asks for them.
query Parameters
thread_ids.*cursor^[A-Za-z0-9_-]+$full_text_searchlimitoffsetsort^-?[a-z0-9_]+$thread_activethread_agentthread_createdthread_idthread_idsthread_spacethread_statusthread_titlethread_typethread_updatedthread_userHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List threads › Responses
Success
has_moreWhether more rows exist past this page.
next_cursorPass back as cursor for the next page. Null on the last page.
Create a thread
Pass thread_space to create it inside a space, which requires write access to that space. Without one it is personal to the caller.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Create a thread › Request Body
thread_idthread_refthread_agentthread_titlethread_activethread_user^-?[0-9]+(\.[0-9]+)?…thread_aclthread_typethread_spacethread_share_modeCreate a thread › Responses
Created
thread_idthread_titlethread_typethread_statusthread_summarythread_contextthread_refthread_agentthread_userthread_spacethread_share_modethread_generating_forthread_metadatathread_activethread_createdthread_updatedagent_idagent_nameagent_iconagent_activeprompt_idprompt_nameGet a thread
Returns the conversation with its agent, its subject and who it is shared with. The messages in it are read separately.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Get a thread › Responses
Success
thread_idthread_titlethread_typethread_statusthread_summarythread_contextthread_refthread_agentthread_userthread_spacethread_share_modethread_generating_forthread_metadatathread_activethread_createdthread_updatedagent_idagent_nameagent_iconagent_activeprompt_idprompt_nameDelete a thread
Deactivates the thread and the messages in it.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Delete a thread › Responses
Success. No content.
Update a thread
Applies the thread_-prefixed fields present in the body. Only an owner may change who the thread is shared with.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Update a thread › Request Body optional
thread_statusthread_activethread_agentthread_userthread_aclthread_spacethread_share_modeUpdate a thread › Responses
Success
thread_idthread_titlethread_typethread_statusthread_summarythread_contextthread_refthread_agentthread_userthread_spacethread_share_modethread_generating_forthread_metadatathread_activethread_createdthread_updatedagent_idagent_nameagent_iconagent_activeprompt_idprompt_nameStream thread events
A server-sent event stream: user_message, assistant_message, lock and presence. This is how a client follows a reply as it is generated rather than polling for it.
Responds with text/event-stream, not JSON — use an SSE client.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Stream thread events › Responses
Success
List thread files
Files belonging to this conversation — what was attached to it, and what was generated in it.
Requires any one of media:view, document:view, knowledge-base:view, thread:view, design:view, prompt:view or presentation:view.
path Parameters
idquery Parameters
cursor^[A-Za-z0-9_-]+$file_added_byfile_createdfile_hashfile_idfile_namefile_provider_idfile_statusfile_typefile_updatedlimitoffsetrepo_idrepo_typesort^-?[a-z0-9_]+$Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List thread files › Responses
Success
has_moreWhether more rows exist past this page.
next_cursorPass back as cursor for the next page. Null on the last page.
List members
Returns who the thread is shared with, and what each of them may do with it.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
List members › Responses
Success
Add a member
Only the owner of a personal thread may share it. A thread that lives in a space takes its access from the space instead, so this does not apply to one.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Add a member › Request Body
usr_idroleAdd a member › Responses
Success
Remove a member
The owner cannot be removed from their own thread.
path Parameters
iduser_idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Remove a member › Responses
Success. No content.
Report presence
Heartbeat behind the presence events. Send it periodically while the thread is open.
path Parameters
idHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Report presence › Responses
Success
Find or create a thread
For conversations attached to something else — a file, a task. Returns the existing thread or starts one.
It is a POST because it writes. If you only want to look, GET /threads?thread_ref=… reads and never creates.
Requires both thread:create and thread:view.
Headers
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Find or create a thread › Request Body
thread_refthread_agentthread_statusthread_titleFind or create a thread › Responses
Success
thread_idthread_titlethread_typethread_statusthread_summarythread_contextthread_refthread_agentthread_userthread_spacethread_share_modethread_generating_forthread_metadatathread_activethread_createdthread_updatedagent_idagent_nameagent_iconagent_activeprompt_idprompt_nameSearch threads
Searches titles and message text, returning matching threads with a highlighted snippet and the message that produced it.
Unless you narrow it yourself, the search covers roughly the last 60 days. Messages are stored in time-partitioned tables, and an unbounded search would read every partition — the window is what keeps it fast.
query Parameters
qdeeplimitthread_spaceHeaders
X-Tenant-IdThe workspace this request acts in. Every row the API returns is isolated to it at the database layer by row-level security.
Search threads › Responses
Success
