Skip to main content
PATCH
Update a session

Headers

x-user-id
string
required

Caller's user ID. Temporary header-based identity; will be replaced by JWT auth.

Path Parameters

session_id
string
required

Query Parameters

agent_id
string
required

Agent the session belongs to.

Body

application/json

Request body for updating an existing session.

Omit any field to keep its current value.

name
string | null

New display name.

chat_model_config
ChatModelConfig · object | null

New model configuration. Replaces the existing one entirely. Pass null to clear; omit to leave unchanged.

fallback_chat_model_config
ChatModelConfig · object | null

New fallback model configuration. Pass null to clear; omit to leave unchanged.

permission_mode
enum<string> | null

New permission mode for the session.

Available options:
default,
accept_edits,
explore,
bypass,
dont_ask

Response

Successful Response

The session record.

user_id
string
required
agent_id
string
required
config
SessionConfig · object
required

Session configuration — set at creation, updatable via PATCH.

id
string

Unique identifier for the credential.

updated_at
string<date-time>
created_at
string<date-time>
source
enum<string>
default:user

The source that created the session.

Available options:
user,
schedule
source_schedule_id
string | null
team_id
string | null
state
AgentState · object

The agent state that should be saved and loaded from storage.