Skip to main content
GET
https://jwhite.tail8bf327.ts.net
/
api
/
v1
/
sessions
/
{session_id}
Get Session
curl --request GET \
  --url https://jwhite.tail8bf327.ts.net/api/v1/sessions/{session_id} \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "session": {
    "session_id": 456,
    "agent_id": 123,
    "session_type": "agent_voice",
    "status": "completed",
    "started_at": "2024-01-15T12:00:00Z",
    "ended_at": "2024-01-15T12:05:30Z",
    "duration": 330,
    "transcript": "User: Hello\nAssistant: Hi there!...",
    "metadata": {
      "source": "web_app"
    },
    "created_at": "2024-01-15T12:00:00Z",
    "agent_name": "Sales Support Agent",
    "language": "en",
    "avatar_id": 1,
    "avatar_name": "Professional Avatar",
    "avatar_url": "https://example.com/avatar.jpg",
    "voice_id": "21m00Tcm4TlvDq8ikWAM"
  }
}

Authentication

Requires API key authentication (x-api-key header).
x-api-key: ah_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Parameters

session_id
integer
required
The ID of the session to retrieve

Request

GET https://jwhite.tail8bf327.ts.net/api/v1/sessions/123
x-api-key: ah_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxx

Response

{
  "success": true,
  "session": {
    "session_id": 456,
    "agent_id": 123,
    "session_type": "agent_voice",
    "status": "completed",
    "started_at": "2024-01-15T12:00:00Z",
    "ended_at": "2024-01-15T12:05:30Z",
    "duration": 330,
    "transcript": "User: Hello\nAssistant: Hi there!...",
    "metadata": {
      "source": "web_app"
    },
    "created_at": "2024-01-15T12:00:00Z",
    "agent_name": "Sales Support Agent",
    "language": "en",
    "avatar_id": 1,
    "avatar_name": "Professional Avatar",
    "avatar_url": "https://example.com/avatar.jpg",
    "voice_id": "21m00Tcm4TlvDq8ikWAM"
  }
}

Response Fields

FieldTypeDescription
successbooleanWhether the request was successful
sessionobjectSession object
session.session_idintegerUnique session identifier
session.agent_idintegerParent agent ID
session.session_typestringSession type (‘agent_voice’, ‘agent_video’, ‘agent_chat’, ‘webrtc_video’)
session.statusstringSession status (‘active’, ‘completed’)
session.started_atstringISO 8601 timestamp when session started
session.ended_atstringISO 8601 timestamp when session ended (null if active)
session.durationintegerSession duration in seconds (null if active)
session.transcriptstringSession transcript
session.metadataobjectCustom metadata (JSON)
session.created_atstringISO 8601 creation timestamp
session.agent_namestringName of parent agent
session.languagestringLanguage code
session.avatar_idintegerAvatar ID
session.avatar_namestringAvatar display name
session.avatar_urlstringAvatar image URL
session.voice_idstringVoice ID from avatar (null if not set)

Error Responses

For information about error responses and status codes, see Error Responses.

Common Errors for This Endpoint

  • 401 Unauthorized - Invalid or missing API key
  • 404 Not Found - Session doesn’t exist
  • 429 Too Many Requests - Rate limit exceeded
  • 500 Internal Server Error - Server error