---
title: "List archived chat sessions."
method: GET
path: "/admin/chats/archived"
tags: ["Chat"]
---

# List archived chat sessions.

`GET /admin/chats/archived`

## Request

- Base URL: `https://h2ogpte.genai.h2o.ai/api/v1`
- URL: `https://h2ogpte.genai.h2o.ai/api/v1/admin/chats/archived`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/h2o/apis/h2ogpte-rest-api/docs/admin/chats/archived/get.ts> (a function with typed inputs; its response is checked against the schema)

Admin-only endpoint to list archived chat sessions with pagination and filtering.

## Query parameters

- `offset` integer
- `limit` integer
- `filter` string
- `sort_column` string
- `ascending` boolean

## Response `200`

Successful operation

- object
  - `items` ChatSession[]
    - `id` string, required
    - `name` string
    - `collection_id` string
    - `collection_name` string
    - `prompt_template_id` string
    - `latest_message_content` string
    - `updated_at` string, date-time, required
    - `workspace` string
    - `status` 'active' | 'expiring' | 'archived': Status of the chat session
    - `expiry_date` string, date-time: An expiry date for the chat session
    - `inactivity_interval` integer: Inactivity interval in days
    - `keep_forever` boolean: Whether the chat session is preserved from auto-archival
    - `username` string: Username of the session owner.
    - `archived_at` string, date-time: Timestamp when the chat session was archived
    - `source` 'user' | 'schedule': How the session was created — 'user' for user-initiated, 'schedule' for scheduled-task-triggered.
  - `total` integer

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `default`: Unexpected error

---

[API](https://skmtc.dev/h2o/apis/h2ogpte-rest-api.md) - [All operations](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/h2o/apis/h2ogpte-rest-api/revisions/a82a117320f4?raw)
