Skip to main content
GET
https://api.agenthuman.com
/
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",
    "avatar": {
      "avatar_id": "avat_01H3Z8G9YR3K2N5M6P7Q8W4T",
      "name": "Professional Avatar",
      "url": "https://example.com/avatar.jpg"
    },
    "session_type": "webrtc_video",
    "status": "ended",
    "started_at": "2024-01-15T12:00:00Z",
    "ended_at": "2024-01-15T12:05:30Z",
    "expiration": "2024-01-15T14:35:00Z",
    "duration": 330,
    "daily_room": {
      "url": "https://agenthuman.daily.co/example-room-name",
      "name": "example-room-name",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    },
    "created_at": "2024-01-15T12:00:00Z",
    "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",
    "avatar": {
      "avatar_id": "avat_01H3Z8G9YR3K2N5M6P7Q8W4T",
      "name": "Professional Avatar",
      "url": "https://example.com/avatar.jpg"
    },
    "session_type": "webrtc_video",
    "status": "ended",
    "started_at": "2024-01-15T12:00:00Z",
    "ended_at": "2024-01-15T12:05:30Z",
    "expiration": "2024-01-15T14:35:00Z",
    "duration": 330,
    "daily_room": {
      "url": "https://agenthuman.daily.co/example-room-name",
      "name": "example-room-name",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    },
    "created_at": "2024-01-15T12:00:00Z",
    "metadata": {
      "user_name": "John Doe",
      "session_purpose": "Customer Support",
      "custom_field": "any value"
    }
  }
}
This endpoint does not return access_token. Save the access_token from the Create Session response if you need it for streaming.