Chat sessions
| Method | Path | Description |
|---|---|---|
| GET | /api/projects/{id}/chat-sessions | List sessions. |
| POST | /api/projects/{id}/chat-sessions | Create 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}/activate | Start a backlog session: give it a branch and a sandbox and run its saved prompt. |
| PATCH | /api/projects/{id}/chat-sessions/{sessionId}/prompt | Edit a backlog session's saved prompt before it starts. |
| POST | /api/projects/{id}/chat-sessions/{sessionId}/read | Mark as read. |
| GET | /api/projects/{id}/chat-sessions/{sessionId}/messages | Full conversation. Any workspace member may read any session. |
| POST | /api/projects/{id}/chat-sessions/{sessionId}/relevance-check | Advisory 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:
| Field | Type | Notes |
|---|---|---|
title | string, 1 to 100 | Optional when content is given. Generated from the first message if omitted. |
content | string | Optional first message. Supplying it creates the session, starts the sandbox and enqueues the first chat job in one call. |
model | string | Optional. Falls back to the workspace default. |
status | 'backlog' | Optional. Creates the session without starting it. |
ownerId | string | Optional. |
priority | enum | Optional. 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.