---
title: "File agent session under a section"
method: PUT
path: "/api/v0/agent/sessions/{session_id}/section"
tags: ["Agent"]
---

# File agent session under a section

`PUT /api/v0/agent/sessions/{session_id}/section`

## 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/sessions/{session_id}/section`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/agent/sessions/:session_id/section/put.ts> (a function with typed inputs; its response is checked against the schema)

File the session under one of the user's chat history sections, moving it out of any other, or under none when `section_id` is null. The session's `updated_at` does not change.

## Path parameters

- `session_id` string, uuid, required

## Request body

- AgentSessionSectionAssignRequest: Request body for filing a session under a chat history section.
  - `section_id` string, uuid, nullable, required: The section to file the session under; null files it under none.

## Response `200`

Successful Response

- AgentSessionGetResponse: Response for getting an agent session.
  - `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.

## 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/sessions/:session_id/section/put.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)
