user_sessions

Import Claude Session

Import messages from a Claude CLI session into a new Omnara session.

This creates:

  1. A new user_session linked to the workspace's main worktree
  2. A new agent_session for the imported messages
  3. All messages from the Claude CLI session

The agent_session_id can then be used as the resume_session_id when starting the SDK to resume from the imported session.

post/api/v1/user-sessions/import-claude-session

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

ImportClaudeSessionRequest required

Request to import messages from a Claude CLI session.

This creates a new user_session and agent_session, then imports all the provided messages into the database. The agent_session_id can then be used as the resume_session_id when starting the SDK.

workspace_id, string required

Workspace ID to import the session into

worktree_name, string nullable

Optional worktree name (null for main workspace)

claude_session_id, string required

Original Claude CLI session ID (used as SDK resume ID)

messages, ImportableMessage[] required

Messages to import from the Claude CLI session

session_name, string nullable

Optional name for the imported session

Response

Successful Response

ImportClaudeSessionResponse required

Response from importing a Claude CLI session.

success, boolean required

Whether the import was successful

user_session_id, string nullable

ID of the created user session

agent_session_id, string nullable

ID of the created agent session

message_count, integer

Number of messages successfully imported

error, string nullable

Error message if the import failed

Changes

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