Skip to main content
PATCH
TypeScript SDK

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

sessionId
string<uuid>
required

Body

application/json
agent
string | null

Change the agent and model key. Null clears the session override.

Required string length: 1 - 500
agentOptions
object

Change agent-specific runtime options, such as reasoning effort.

baseBranch
string | null

Change the starting Git branch. Null clears the session override.

Required string length: 1 - 500
branchName
string | null

Change the session Git branch name. Null clears the stored name.

Required string length: 1 - 500
description
string

Replace the initial task prompt; only the session creator can change it. Use createMessage to send a follow-up task.

Required string length: 1 - 1000000
richContent
object

Replace the initial prompt rich-text document, or null to clear it. Only the session creator can change it.

Example:
level
integer

Archive or restore the session and set its priority: 0 archives and stops its VM; 1 restores without restarting work; 2–100 also keep it unarchived and set its priority level. Omit to preserve the current level.

Required range: 0 <= x <= 100
mcpServers
string[]

Replace the enabled MCP server or connection IDs. An empty array clears the selection.

Maximum array length: 100
Required string length: 1 - 500
mode
enum<string>

Switch between Build (normal) and Plan (planning) modes.

Available options:
normal,
planning
projectId
string | null

Change the project environment used for the workspace. Null clears the session override.

sandboxSize
enum<string> | null

Change the workspace VM size. Null clears the session override.

Available options:
nano,
micro,
small,
medium,
large,
xl,
xxl,
ultra,
null
targetBranch
string | null

Change the default pull request target branch. Null clears the session override.

Required string length: 1 - 500
title
string

Rename the session.

Required string length: 1 - 1000
visibility
enum<string>

Change session visibility: private or visible to workspace (public). Only the session creator can change it.

Available options:
private,
public

Response

Update a session

agent
string | null
required
agentId
string<uuid> | null
required
artifactType
enum<string> | null
required
Available options:
PullRequest,
ToolCall,
Plan,
Response,
File,
Service,
Source,
null
baseBranch
string | null
required
branchName
string | null
required
createdAt
string<date-time>
required
externalId
string | null
required
externalUrl
string | null
required
id
string<uuid>
required
kind
string
required
lastQueuedAt
string<date-time> | null
required
lastSeenAt
string<date-time>
required
level
integer
required
mode
enum<string>
default:normal
required
Available options:
normal,
planning
projectId
string | null
required
sandboxSize
enum<string> | null
required
Available options:
nano,
micro,
small,
medium,
large,
xl,
xxl,
ultra,
null
sessionType
enum<string>
default:Chat
required
Available options:
Chat,
Terminal
targetBranch
string | null
required
title
string
required
updatedAt
string<date-time>
required
visibility
enum<string>
default:public
required
Available options:
public,
private
artifacts
object[]
required
description
string | null
required
diffSummary
object | null
required
htmlUrl
string<uri>
required
isPinned
boolean
required
project
object | null
required
sessionSource
object
required
sourcePullRequest
object | null
required
state
object
required