---
title: "List all active sessions"
method: GET
path: "/api/messaging/sessions"
tags: ["messaging"]
---

# List all active sessions

`GET /api/messaging/sessions`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/messaging/sessions`
- Auth: none declared

Administrative endpoint to list all active sessions in the system

## Response `200`

Sessions list retrieved successfully

- object
  - `sessions` SessionInfo[]
    - `sessionId` string: Unique session identifier
    - `agentId` string, uuid: UUID of the agent
    - `userId` string, uuid: UUID of the user
    - `createdAt` string, date-time: Session creation timestamp
    - `lastActivity` string, date-time: Last activity timestamp
    - `metadata` object: Session metadata
    - `expiresAt` string, date-time: When the session will expire
    - `timeoutConfig` object: Current timeout configuration
      - `timeoutMinutes` integer: Inactivity timeout in minutes
      - `autoRenew` boolean: Whether auto-renewal is enabled
      - `maxDurationMinutes` integer: Maximum total session duration
      - `warningThresholdMinutes` integer: Minutes before expiration to trigger warning
    - `renewalCount` integer: Number of times the session has been renewed
    - `timeRemaining` integer: Milliseconds until session expiration
    - `isNearExpiration` boolean: Whether the session is within the warning threshold
  - `total` integer: Total number of active sessions
  - `stats` object
    - `totalSessions` integer
    - `activeSessions` integer
    - `expiredSessions` integer

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
