Get session by ID

Beta

Retrieve a single session by its asset ID, including state, originating channel, agent/model, message count, and cost.

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

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

Path parameters

asset_idstringRequired

Response

Successful Response
created_atdatetime

Timestamp when the session was created (ISO 8601)

idstring

Unique identifier of the session asset (e.g., ‘asset_abc123’)

thread_idstring
LangChain thread ID backing this session's message history
updated_atdatetime

Timestamp when the session was last updated (ISO 8601)

agentstring or null
Agent identity the session ran with, when set
app_idstring or null
Application identifier the session belongs to, when set
created_by_idstring or null
Unique identifier of the user who created this session
is_sub_sessionbooleanDefaults to false

Whether this is a branched sub-session of another session

last_message_previewstring or null

Plain-text preview of the most recent message, when available

modelstring or null
Model the session ran with, when set
num_messagesinteger or null
Number of messages in the session, when tracked
parent_session_idstring or null

Asset ID of the parent session for sub-sessions

session_typestring or null

Kind of session: ‘session’ (chat), ‘video_session’, ‘desktop_session’, or ‘mobile_session’

source_channelstring or null

Channel the session originated from (e.g., ‘web’, ‘api’, ‘agent_email’, ‘agent_slack’, ‘agent_sms’)

statestring or null

Execution state of the session (e.g., ‘running’, ‘completed’)

titlestring or null
Display title of the session
total_cost_usddouble or null
Total LLM cost of the session in USD, when tracked
workspace_idstring or null
Unique identifier of the workspace this session belongs to

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error