Skip to main content
PATCH
/
api
/
v1
/
user-sessions
/
{user_session_id}
Update User Session
curl --request PATCH \
  --url https://api.example.com/api/v1/user-sessions/{user_session_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "session_settings": {
    "code": {
      "mode": "agent",
      "default_provider": "<string>",
      "providers": {
        "claude_code": {
          "model": "haiku"
        },
        "codex": {
          "model": "gpt-5.1-codex-max",
          "thinking": "low"
        }
      }
    },
    "voice": {
      "language": "<string>"
    }
  }
}
'
{
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "ACTIVE",
  "created_at": "2023-11-07T05:31:56Z",
  "kind": "user_session",
  "name": "<string>",
  "metadata": {},
  "settings": {
    "code": {
      "mode": "agent",
      "default_provider": "<string>",
      "providers": {
        "claude_code": {
          "model": "haiku"
        },
        "codex": {
          "model": "gpt-5.1-codex-max",
          "thinking": "low"
        }
      }
    },
    "voice": {
      "language": "<string>"
    }
  },
  "worktree_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "worktree_name": "<string>",
  "worktree_type": "LOCAL"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

user_session_id
string
required

Body

application/json

Payload for updating a user session.

name
string | null

New name for the session

Maximum string length: 255
session_settings
SessionSettings · object

User session settings for code/voice agents

Response

Successful Response

Representation of a user-owned conversation container.

session_id
string<uuid>
required

Unique session identifier

user_id
string<uuid>
required

Owner user identifier

status
enum<string>
required

Current session status

Available options:
ACTIVE,
COMPLETED,
DELETED
created_at
string<date-time>
required

Timestamp when the session was created

kind
string
default:user_session

Descriptor type discriminator

Allowed value: "user_session"
name
string | null

Optional user-defined session name

metadata
Metadata · object

Arbitrary session metadata

settings
SessionSettings · object

Session settings for code and voice agents

worktree_id
string<uuid> | null

Associated worktree identifier

worktree_name
string | null

Name of the associated worktree

worktree_type
enum<string> | null

Type of the associated worktree (LOCAL or REMOTE)

Available options:
LOCAL,
REMOTE