Skip to main content

Overview

Threads represent conversation sessions between users and the Loom AI agent. Each thread contains a sequence of messages, tool calls, and execution state. Ownership: Users can only access threads they own. System administrators can access all threads.

Create or Update Thread

Creates a new thread or updates an existing one. Supports optimistic concurrency control via the If-Match header.

Path Parameters

string
required
Thread ID (must match ID in request body)

Headers

integer
Expected thread version for optimistic locking

Request Body

Send the full Thread object (see loom-common-thread schema):
string
required
Thread ID (must match path parameter)
string
Thread title
string
Workspace root path
string
required
Visibility level: "private", "shared", or "public"
array
required
Array of message objects
integer
required
Thread version (increment on each update)
string
required
ISO 8601 timestamp (server will overwrite)

Response

string
Thread ID
integer
New version number after upsert
string
ISO 8601 timestamp of last update

Example

Response (200 OK):
Error (409 Conflict) if version mismatch:

Get Thread

Retrieves a single thread by ID. Only the thread owner (or system admin) can access.

Path Parameters

string
required
Thread ID

Response

Returns the full Thread object.

Example

Error (404 Not Found) if thread doesn’t exist or user doesn’t own it:

List Threads

Lists threads owned by the authenticated user. Supports filtering by workspace and pagination.

Query Parameters

string
Filter by workspace root path
integer
default:"50"
Maximum number of results (1-100)
integer
default:"0"
Number of results to skip for pagination

Response

array
Array of ThreadSummary objects (lightweight version without full message history)
integer
Total number of threads matching the filter
integer
Limit from request
integer
Offset from request

Example

Delete Thread

Soft-deletes a thread. Only the thread owner (or system admin) can delete.

Path Parameters

string
required
Thread ID

Response

Returns 204 No Content on success.

Example

Response: 204 No Content Error (404 Not Found) if thread doesn’t exist or user doesn’t own it.

Update Thread Visibility

Updates only the thread visibility without syncing the full thread content. Supports optimistic locking.

Path Parameters

string
required
Thread ID

Headers

integer
Expected thread version

Request Body

string
required
New visibility: "private", "shared", or "public"

Response

Returns the updated Thread object with incremented version.

Example

Search Threads

Full-text search across thread titles and messages. Searches only threads owned by the authenticated user.

Query Parameters

string
required
Search query
string
Filter by workspace root
integer
default:"50"
Maximum number of results
integer
default:"0"
Pagination offset

Response

array
Array of search results with relevance scores
object
ThreadSummary object
number
Relevance score (higher = more relevant)
integer
Limit from request
integer
Offset from request

Example

Error (400 Bad Request) if search query is empty: