Skip to main content
GET
Get Agent Session

Authorizations

Authorization
string
header
required

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

Path Parameters

session_id
string
required

Query Parameters

include
string | null

Comma-separated extra sections to return. Allowed values: turns (per-turn latency; without it turns is null). Any other value answers 400.

Response

Request fulfilled, document follows

session_id
string
required
agent_id
string
required
agent_name
string
required
status
enum<string>
required
Available options:
pending,
active,
completed,
failed,
unknown
conversation_status
string
required

How the conversation went, derived from status and end_reason. Current values: active is still going; resolved ended normally, which does not mean the caller's problem was solved; escalated was transferred to a person; missed is a call nobody connected to, or one the caller left before the agent started; error is a conversation the platform ended because something failed. New values may be added, so treat an unknown value as a status you do not recognise rather than an error. Filter the list with conversation_status, which accepts only the values above.

source
enum<string>
required
Available options:
api_key,
dashboard,
public,
phone,
whatsapp
created_at
string
required
name
string | null
end_user_id
string | null
end_reason
enum<string> | null
Available options:
user_hangup,
agent_hangup,
escalated,
conversation_timeout,
heartbeat_timeout,
agent_join_timeout,
internal_error,
llm_endpoint_failure,
room_join_timeout,
cancelled,
dial_failed,
call_rejected
rejection_reason
enum<string> | null

Why an inbound phone call was refused before entering a session (when end_reason is call_rejected). Null on all other sessions.

Available options:
missing_dynamic_variables,
agent_not_published,
number_unassigned,
number_not_active,
out_of_credit,
concurrency_limit_exceeded
rejection_detail
string | null

Human-readable detail for rejection_reason when extra context is available, such as missing dynamic variable names or phone number status. Null when no extra context applies. Intended for display, wording is not guaranteed to stay stable.

direction
enum<string>
default:inbound
Available options:
inbound,
outbound
dial_status
enum<string> | null
Available options:
answered,
busy,
no_answer,
failed
dial_sip_status
integer | null

busy, no_answer and failed: the final SIP response code the carrier or your SIP trunk gave to the outbound dial. Null on an answered call and when it gave none.

dial_sip_reason
string | null

The reason text the carrier or your SIP trunk sent with dial_sip_status, verbatim, for example Busy here. Null when it sent none.

answered_by
enum<string> | null
Available options:
human,
voicemail,
unknown
caller_number
string | null
caller_id_withheld
boolean | null
dialed_number
string | null
sip_call_id
string | null
call_sid
string | null
timezone
string | null
started_at
string | null
ended_at
string | null
duration_seconds
integer | null
participant_identity
string | null
agent_participant_identity
string | null
agent_joined_at
string | null
metadata
Metadata · object
content_purged_at
string | null
keypad_menu
AgentSessionKeypadMenu · object | null

How the keypad menu of an inbound phone call ended. outcome is selected when the caller chose an option, no_input or no_match when no attempt got a valid choice (the last one had no input, or input matching no option), and skipped when the menu could not run (a resumed conversation or no SIP caller). value is what the menu variable received: the chosen option's value, or the fallback value when the caller never made a valid choice.

unattributed_llm_usage
LLMMessageUsage · object[]
items
(AgentSessionMessageItem · object | AgentSessionToolCallItem · object | AgentSessionTransferItem · object | AgentSessionToolResultItem · object)[]

One transcript message; system messages never surface here.

analysis
AgentSessionAnalysisResult · object | null

The post-call analysis of the session.

llm_endpoint_errors
AgentSessionLlmEndpointError · object[]
llm_fallbacks
AgentSessionLlmFallback · object[]
engine_fallbacks
AgentSessionEngineFallback · object[]
turns
AgentSessionTurn · object[] | null

Per-turn latency, ascending by turn_id. Only returned when include=turns is set; null otherwise. A turn's messages and tool calls are in items with the same turn_id.