Skip to main content
Endpoint: GET /v1/sessions/{session_id} This endpoint retrieves details of a specific session based on the provided session_id.

Query String Parameters

timeout
string
Optional timeout for the request.

Parameters

session_id
string
required
The unique ID of the session to retrieve.
Curl
curl -X GET "https://agent.api.lyzr.app/v1/sessions/{session_id}?timeout=30" \
-H "accept: application/json"\
-H "x-api-key: your_api_key_here"
Python
import requests

session_id = "123"
url = f"https://agent.api.lyzr.app/v1/sessions/{session_id}?timeout=30"
headers = {
    "Content-Type": "application/json",
    "x-api-key": "your_api_key_here"
}

response = requests.get(url, headers=headers)
{
  "active": false,
  "session_id": "IITZ",
  "_id": "66dac329a64b2c361cb39286",
  "user_id": "123",
  "created_at": "2024-09-06T08:54:01.978000"
}

Response Parameters

active
boolean
Indicates if the session is currently active.
session_id
string
The unique identifier of the session.
_id
string
The internal ID of the session in the database.
user_id
string
The ID of the user associated with the session.
created_at
string
The timestamp when the session was created.
I