---
title: "List chat history sections"
method: GET
path: "/api/v0/agent/session-sections"
tags: ["Agent"]
---

# List chat history sections

`GET /api/v0/agent/session-sections`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/agent/session-sections`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/agent/session-sections/get.ts> (a function with typed inputs; its response is checked against the schema)

List the user's chat history sections, oldest first, each with the first `per_section_limit` sessions filed under it that pass the filters and how many pass in all. Every section is listed, including one no session passes for.

## Query parameters

- `q` string, nullable: Keep the sessions whose name or message text matches, or with this session ID.
- `persona_id` string, uuid, nullable: Keep the sessions of this persona.
- `without_persona` boolean: Keep the sessions on the default persona; wins over `persona_id`.
- `per_section_limit` integer: How many sessions to return for each section.

## Response `200`

Successful Response

- AgentSessionSectionListResponse: Response for listing the user's chat history sections.
  - `sections` AgentSessionSectionWithSessions[], required: Every section of the user, oldest first, each with its matching sessions.
    - `id` string, uuid, required: The ID of the section.
    - `name` string, required: The name of the section.
    - `created_at` string, date-time, required: When the section was created.
    - `updated_at` string, date-time, required: When the section was last renamed.
    - `sessions` AgentSessionGetResponse[], required: The first page of the section's sessions that pass the filters, newest activity first; `GET /sessions?section_id=` pages through the rest.
      - `id` string, uuid, required: The ID of the session.
      - `persona_id` string, uuid, nullable: The ID of the persona used by this session. Null means default persona.
      - `name` string, nullable, required: The name of the session.
      - `status` string, required: The status of the session. Options: 'active', 'completed', 'error'.
      - `settings` AgentSessionSettings, required: Settings for an agent session.
        - `max_iterations` integer, nullable: Maximum number of agent loop iterations. When null, uses server default (30).
      - `message_count` integer, required: The number of messages in the session.
      - `is_roaming` boolean: True iff this session's persona exposes any fs_* / fs_bash tool and therefore has a workspace directory the agent reads/writes.
      - `section_id` string, uuid, nullable: The chat history section this session is filed under; null when it is in none.
      - `created_at` string, date-time, required: When the session was created.
      - `updated_at` string, date-time, required: When the session was last updated.
    - `session_total` integer, required: How many of the section's sessions pass the filters.

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-11** `f9dcfeb78d3d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/agent/session-sections/get.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
