Skip to main content

Chat sessions

MethodPathDescription
GET/api/projects/{id}/chat-sessionsList sessions.
POST/api/projects/{id}/chat-sessionsCreate a session, optionally with its first message.
GET/api/projects/{id}/chat-sessions/{sessionId}Session details plus the latest chat, submit and sync job, whether it can be submitted, and the PR URL.
PUT/api/projects/{id}/chat-sessions/{sessionId}Update title, status, model, ownerId or priority. Archiving closes the PR, unarchiving reopens it.
DELETE/api/projects/{id}/chat-sessions/{sessionId}Delete the session and queue cleanup.
POST/api/projects/{id}/chat-sessions/{sessionId}/activateStart a backlog session: give it a branch and a sandbox and run its saved prompt.
PATCH/api/projects/{id}/chat-sessions/{sessionId}/promptEdit a backlog session's saved prompt before it starts.
POST/api/projects/{id}/chat-sessions/{sessionId}/readMark as read.
GET/api/projects/{id}/chat-sessions/{sessionId}/messagesFull conversation. Any workspace member may read any session.
POST/api/projects/{id}/chat-sessions/{sessionId}/relevance-checkAdvisory check of whether a draft message fits the session. Body { message }. Rate limited to one per session every 2 seconds.
GET/api/chat-sessions/search?q=Search sessions across every workspace you belong to. Empty q returns recent sessions.

List query parameters: status, priorities, owners, search, limit, cursor, sortByPriority, excludeArchived, excludeBacklog. Passing limit switches the response to the paginated envelope with a nextCursor.

Create body:

FieldTypeNotes
titlestring, 1 to 100Optional when content is given. Generated from the first message if omitted.
contentstringOptional first message. Supplying it creates the session, starts the sandbox and enqueues the first chat job in one call.
modelstringOptional. Falls back to the workspace default.
status'backlog'Optional. Creates the session without starting it.
ownerIdstringOptional.
priorityenumOptional. One of urgent, high, medium, low, none.

Either title or content is required. The response is 201 with { session }, plus chatJobId and jobNumber when a first message started a job. Attachments are supported by sending multipart/form-data instead of JSON.