List Sessions
Get all sessions for a specific worktree.string
required
The unique identifier of the worktree
Response
array
Array of session objects
Example Request
cURL
Create Session
Create a new chat session in a worktree.string
required
The unique identifier of the worktree
string
Session name (auto-generated if not provided)
string
Execution mode:
plan, build, or yolo (default: plan)string
AI model to use (inherits from project/global settings if not specified)
string
AI backend:
claude, codex, or opencodeResponse
Returns the newly created session object.Example Request
cURL
Get Session
Retrieve details about a specific session.string
required
The unique identifier of the session
Response
Returns a session object with full details including message history.Example Request
cURL
Update Session
Update session properties.string
required
The unique identifier of the session
string
New session name
string
New execution mode
Example Request
cURL
Archive Session
Archive a session (soft delete).string
required
The unique identifier of the session
Example Request
cURL
Delete Session
Permanently delete a session.string
required
The unique identifier of the session
Example Request
cURL
WebSocket Events
When connected to the WebSocket, you’ll receive real-time updates about session changes:Session Created
Session Updated
Session Archived
Session Deleted
Next Steps
Chat API
Send messages and receive responses in a session
Worktrees API
Manage worktrees that contain sessions