user_sessions

Create User Session Endpoint

Create a new user session container for the authenticated user.

Accepts either worktree_id (preferred) or workspace_id (deprecated). If workspace_id is provided, the main worktree for that workspace is used.

If start_sandbox is True and the worktree is REMOTE, the sandbox session will be started immediately after creating the user session.

post/api/v1/user-sessions

Request

  • Base URL
    https://docs.omnara.com (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

CreateUserSessionRequest required

Payload for creating or reusing a user session container.

worktree_id, string nullable

Worktree identifier linked to this session (preferred)

workspace_id, string nullable

Deprecated: Use worktree_id instead. If worktree_id is not provided, the main worktree for this workspace will be used.

user_session_id, string nullable

Optional explicit user session id to reuse or create

name, string nullable

Optional human-readable session name

metadata, object nullable

Arbitrary key-value metadata for the session

start_sandbox, boolean

If True and worktree is REMOTE, start the sandbox session immediately

session_settings, SessionSettingsInput nullable

Per-session settings for a user session.

initial_message, string nullable

Initial message to queue for the agent. This message will be delivered as soon as the agent connects, eliminating the frontend waterfall delay.

Response

Successful Response

UserSessionSummary required

Aggregated user session data returned to clients.

session, UserSessionDescriptor required

Core user session descriptor

agent_sessions, AgentSessionDescriptorOutput[]

Agent sessions associated with this user session

workspace, WorkspaceDescriptor nullable

Serialized workspace row returned to API clients.

worktree, WorktreeDescriptor nullable

Serialized worktree entity returned to API clients.

Changes

No recorded changes to this operation across all 1 revision of this API.