Skip to Content
Calls

Get a call

Permissioncalls:readAuthentication
GET
/calls/{id}

Returns the call with its redacted transcript and tool input/output, post-call results, recording metadata, metrics, actions, context-delivery state and retention state.

Eval-backed sessions are indistinguishable from missing calls.

Purged calls stay readable

A purged tombstone still responds, and exposes purge_cleanup so asynchronous deletion can be polled.

Retry-After is present while purge cleanup, context delivery, or an embedded webhook delivery is still non-terminal.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Response Body

Call detail.

application/json
  1. response
id*string
Formatuuid
room_name*string
agent_id*|
Formatuuid
agent_slug*string|null
agent_name*string|null
agent_version_id*|
Formatuuid
agent_version*|

Published version number. Null when the call ran the agent's unpublished draft (see agent_version_is_draft) or has no agent.

agent_version_is_draft*boolean

True when agent_version_id is the agent's draft — dashboard and API test calls usually run the draft, which has no version number.

channel*|

How the call reached the platform: sip_inbound / sip_outbound telephony, web_sdk (POST /v1/web-calls), web_test (dashboard test call), transfer_brief (warm-transfer consult leg). Null for ingested human-handled calls. For web channels metadata.source is web_call / test_call rather than real_call.

Value in"sip_inbound""sip_outbound""web_sdk""web_test""eval""transfer_brief"null
direction*string

Direction-normalized side of the call. Web and test calls are inbound (the browser user calls the agent). For outbound calls caller_number is the dialed destination and platform_number the caller ID presented.

Value in"inbound""outbound"
flow_id*|

The flow this call ran inside, or null for an ordinary single-agent call. agent_slug and agent_name stay the agent that OPENED the call; later hops appear as handoff markers in the transcript.

Formatuuid
flow_slug*string|null
flow_name*string|null
group_id*|

The group this call was routed through, or null. agent_slug and agent_name are then the agent of the member the call was assigned to.

Formatuuid
group_member_id*|

The group member the call was assigned to, or null.

Formatuuid
group_name*string|null
group_member_label*|

The assigned member's label (A, B, …), or null.

started_at*string
Formatdate-time
answered_at*|
Formatdate-time
ended_at*|
Formatdate-time
duration_sec*|
Range0 <= value
ring_duration_sec*|
Range0 <= value
talk_duration_sec*|
Range0 <= value
total_duration_sec*|
Range0 <= value
outcome*string|null
status*string
Value in"live""completed"
lifecycle_status*CallLifecycleStatus
Value in"ringing""in_progress""ended""failed"
display_status*string
Value in"ringing""queued""in_progress""ended""failed"
failure_code*string|null
failure_reason*string|null
ended_reason*string|null
segment_count*integer
Range0 <= value
metadata*|null
legal_hold*boolean
purged_at*|
Formatdate-time
purge_kind*|
Value in"manual""retention"null
caller_number*|

The external party, direction-normalized: the caller for inbound calls, the dialed destination for outbound calls. Null for web, test and older calls.

platform_number*|

The platform's DID or trunk number: the number dialed for inbound calls, the caller ID presented for outbound calls.

handled_by*string

Who was on the platform's end of the call: ai for calls a Kejue Voice agent handled, human for an ingested recording of a human-handled call. Human calls carry metadata.human_agent and have no agent version. This is a different axis from the session's channel (sip_inbound, web_sdk, ...), which records how the call reached the platform: a human-handled call that arrived over a SIP trunk is still sip_inbound.

Value in"ai""human"
updated_at*string
Formatdate-time
contact_id*|
Formatuuid
transcript*array<>
live_transcript*unknown

Current redacted live transcript snapshot, or null when unavailable.

transcript_id*|
Formatuuid
redacted_entities*|null
has_encrypted_raw*boolean
tool_invocations*array<>
actions*array<>
data_messages*array<>
summary*|null
extractions*array<>
webhook_deliveries*array<>
recordings*array<>
recording_enabled*boolean

True when the deployment stores call recordings and the call had audio. Always false for text-modality web calls.

turn_metrics*array<>
metrics_rollup*|null
user_turn_audio*array<>
purge_cleanup*|null
failure_reason_internal*|

Operator-only failure diagnostics. Customer responses return null and expose the classified failure_code and failure_reason instead.

Lengthlength <= 2049
sip_failure*|null
sip_messages*array<>

Captured SIP messages for the call's setup (first INVITE, auth challenge, final response), oldest first.

sip_rejections*array<>
timeline_available*boolean

True when GET /v1/calls/{id}/timeline has evidence beyond the session's own start/answer/end markers — the agent event log, model requests, tool calls, turn metrics, transcript, transfer or SIP events, or a ready recording. The timeline's sources array names which of them it was assembled from.

Example Request
curl -X GET 'https://api.kejue.co/v1/calls/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "room_name": "string",  "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978",  "agent_slug": "string",  "agent_name": "string",  "agent_version_id": "1c2a713c-7248-4a56-a9eb-0bdcb3a41741",  "agent_version": 0,  "agent_version_is_draft": true,  "channel": "sip_inbound",  "direction": "inbound",  "flow_id": "0746f03b-16cc-49fb-9833-df3713d407d2",  "flow_slug": "string",  "flow_name": "string",  "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f",  "group_member_id": "03c46fef-cbe7-4bba-8c49-d666090d0932",  "group_name": "string",  "group_member_label": "string",  "started_at": "2019-08-24T14:15:22Z",  "answered_at": "2019-08-24T14:15:22Z",  "ended_at": "2019-08-24T14:15:22Z",  "duration_sec": 0,  "ring_duration_sec": 0,  "talk_duration_sec": 0,  "total_duration_sec": 0,  "outcome": "string",  "status": "live",  "lifecycle_status": "ringing",  "display_status": "ringing",  "failure_code": "string",  "failure_reason": "string",  "ended_reason": "string",  "segment_count": 0,  "metadata": {},  "legal_hold": true,  "purged_at": "2019-08-24T14:15:22Z",  "purge_kind": "manual",  "caller_number": "string",  "platform_number": "string",  "handled_by": "ai",  "updated_at": "2019-08-24T14:15:22Z",  "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598",  "transcript": [    {      "segment_index": 0,      "speaker": "agent",      "text": "string",      "timestamp": 0,      "kind": "",      "interrupted": true,      "name": "string",      "is_error": true,      "dtmf_masked": true,      "digit_count": 0,      "reason": "string",      "speech_id": "string",      "from_agent": "string",      "to_agent": "string",      "leg": "caller"    }  ],  "live_transcript": null,  "transcript_id": "215670dc-b708-4c27-9393-0b9ca7d8935d",  "redacted_entities": {},  "has_encrypted_raw": true,  "tool_invocations": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "tool_kind": "string",      "tool_slug": "string",      "tool_name": "string",      "ok": true,      "http_status": 0,      "error_kind": "string",      "duration_ms": 0,      "occurred_at": "2019-08-24T14:15:22Z",      "request_redacted": null,      "response_redacted": null,      "has_raw_io": true,      "phase": "in_call"    }  ],  "actions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "kind": "string",      "target_kind": "string",      "target_id": "string",      "summary": "string",      "detail": null,      "occurred_at": "2019-08-24T14:15:22Z"    }  ],  "data_messages": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "call_id": "0d0a16ab-a508-4d58-bf24-5dc3cb248f3e",      "role": "system",      "urgency": "immediate",      "content_redacted": "string",      "source": "string",      "actor_kind": "user",      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",      "api_key_id": "b0dd218e-3bcf-4bdb-a1e3-0689d60a8afd",      "subscriber_count": 0,      "delivered": true,      "delivery_status": "pending",      "delivery_attempts": 0,      "delivery_error_code": "string",      "next_delivery_at": "2019-08-24T14:15:22Z",      "published_at": "2019-08-24T14:15:22Z",      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "summary": {    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "status": "string",    "text": "string",    "model": "string",    "error": "string",    "started_at": "2019-08-24T14:15:22Z",    "completed_at": "2019-08-24T14:15:22Z"  },  "extractions": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "extraction_object_id": "dd58f28a-20cf-4d0e-af7a-6fd115475937",      "name": "string",      "status": "string",      "model": "string",      "fields": {},      "result": {},      "error": "string",      "started_at": "2019-08-24T14:15:22Z",      "completed_at": "2019-08-24T14:15:22Z"    }  ],  "webhook_deliveries": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "webhook_config_id": "df156cd4-8746-4feb-9a60-29437338c6cd",      "webhook_name": "string",      "webhook_url": "http://example.com",      "event": "string",      "attempt": 0,      "max_attempts": 1,      "status": "string",      "scheduled_at": "2019-08-24T14:15:22Z",      "next_retry_at": "2019-08-24T14:15:22Z",      "started_at": "2019-08-24T14:15:22Z",      "completed_at": "2019-08-24T14:15:22Z",      "response_status": 100,      "error": "string"    }  ],  "recordings": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "role": "agent",      "leg": "caller",      "segment_index": 0,      "status": "recording",      "format": "ogg_opus",      "duration_sec": 0,      "size_bytes": 0,      "error": "string",      "created_at": "2019-08-24T14:15:22Z",      "completed_at": "2019-08-24T14:15:22Z",      "error_kind": "string",      "channels": 1,      "has_peaks": true,      "egress_started_at": "2019-08-24T14:15:22Z"    }  ],  "recording_enabled": true,  "turn_metrics": [    {      "model_generation_ids": [        "string"      ],      "model_ttft_ms": 0,      "model_duration_ms": 0,      "pipeline_mode": "string",      "model_family": "string",      "model_name": "string",      "model_role": "string",      "response_measurement": "measured",      "turn_outcome": "string",      "turn_index": 0,      "speech_id": "string",      "ts": "2019-08-24T14:15:22Z",      "response_latency_ms": 0,      "eou_delay_ms": 0,      "transcription_delay_ms": 0,      "stt_duration_ms": 0,      "slm_ttft_ms": 0,      "slm_duration_ms": 0,      "tts_ttfb_ms": 0,      "tts_duration_ms": 0,      "tts_audio_duration_ms": 0,      "tool_latency_ms": 0,      "tool_call_count": 0,      "transcribe_wait_ms": 0,      "model_first_token_ms": 0,      "model_hidden_ms": 0,      "tool_wait_ms": 0,      "first_chunk_ms": 0,      "tts_first_audio_ms": 0,      "handoff_ms": 0,      "breakdown_version": 0    }  ],  "metrics_rollup": {    "avg_model_ttft_ms": 0,    "p50_model_ttft_ms": 0,    "p95_model_ttft_ms": 0,    "avg_model_duration_ms": 0,    "turn_count": 0,    "duty_cycle": 0,    "p50_response_latency_ms": 0,    "p95_response_latency_ms": 0,    "p99_response_latency_ms": 0,    "avg_response_latency_ms": 0,    "avg_eou_delay_ms": 0,    "p50_eou_delay_ms": 0,    "p95_eou_delay_ms": 0,    "avg_slm_ttft_ms": 0,    "p50_slm_ttft_ms": 0,    "p95_slm_ttft_ms": 0,    "avg_slm_duration_ms": 0,    "avg_tts_ttfb_ms": 0,    "p50_tts_ttfb_ms": 0,    "p95_tts_ttfb_ms": 0,    "avg_tts_duration_ms": 0,    "avg_stt_duration_ms": 0,    "avg_tool_latency_ms": 0  },  "user_turn_audio": [    {      "segment_index": 0,      "turn_index": 0,      "leg": "caller"    }  ],  "purge_cleanup": {    "status": "not_required",    "total": 0,    "deleted": 0,    "pending": 0  },  "failure_reason_internal": "string",  "sip_failure": {    "status": 100,    "status_text": "string",    "reason": "string",    "disconnect_reason": "string",    "call_id": "string",    "class": "string",    "q850_cause": 1,    "q850_text": "string",    "source": "capture"  },  "sip_messages": [    {      "seq": 0,      "sip_call_id": "string",      "direction": "sent",      "hop": "sonus",      "src": "string",      "dst": "string",      "transport": "string",      "kind": "request",      "method": "string",      "status_code": 0,      "reason": "string",      "headers": "string",      "ts": "2019-08-24T14:15:22Z"    }  ],  "sip_rejections": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "session_id": "1ffd059c-17ea-40a8-8aef-70fd0307db82",      "occurred_at": "2019-08-24T14:15:22Z",      "direction": "inbound",      "stage": "string",      "sip_status": 0,      "sip_reason": "string",      "caller_number": "string",      "called_number": "string",      "sip_trunk_id": "3eeb45a3-96f0-493f-8a7e-d09946261852",      "phone_number_id": "54afc7b8-17df-415a-9fb0-21ee66219576",      "sip_call_id": "string",      "source_ip": "string",      "detail_internal": "string",      "messages": [        {          "seq": 0,          "sip_call_id": "string",          "direction": "sent",          "hop": "sonus",          "src": "string",          "dst": "string",          "transport": "string",          "kind": "request",          "method": "string",          "status_code": 0,          "reason": "string",          "headers": "string",          "ts": "2019-08-24T14:15:22Z"        }      ]    }  ],  "timeline_available": true}