Skip to main content
GET
/
v1
/
sessions
/
{session_id}
Get Session
curl --request GET \
  --url https://api.agenthuman.com/v1/sessions/{session_id} \
  --header 'x-api-key: <api-key>'
{
  "success": true,
  "session": {
    "session_id": "sess_01H3Z8G9YR3K2N5M6P7Q8W4T",
    "status": "ended",
    "started_at": "2024-01-15T12:00:00Z",
    "ended_at": "2024-01-15T12:05:30Z",
    "expiration": "2024-01-15T14:35:00Z",
    "duration": 330,
    "metadata": {
      "user_name": "John Doe",
      "session_purpose": "Customer Support",
      "custom_field": "any value"
    }
  }
}

Path Parameters

session_id
string
required
The ID of the session to retrieve

Response

success
boolean
Whether the request was successful
session
object
The session object (See Session schema).
{
  "success": true,
  "session": {
    "session_id": "sess_01H3Z8G9YR3K2N5M6P7Q8W4T",
    "status": "ended",
    "started_at": "2024-01-15T12:00:00Z",
    "ended_at": "2024-01-15T12:05:30Z",
    "expiration": "2024-01-15T14:35:00Z",
    "duration": 330,
    "metadata": {
      "user_name": "John Doe",
      "session_purpose": "Customer Support",
      "custom_field": "any value"
    }
  }
}
This endpoint does not return session_token or room. Save the session_token from the Create Session response if you need it for streaming. The room configuration is stored but not exposed in API responses.