---
title: "Update Session"
method: PATCH
path: "/agent/sessions/{session_id}"
---

# Update Session

`PATCH /agent/sessions/{session_id}`

Update a chat session (rename and/or persist the SDK session id).

## Path parameters

- `session_id` string, required

## Request body

- UpdateSessionRequest — Body for updating a chat session (partial update). All fields optional. ``title`` renames the session; ``sdk_session_id`` is written by the client after agent-service emits it, so the agent's multi-turn memory persists across idle eviction and restarts.
  - `title` string, nullable
  - `sdk_session_id` string, nullable

## Response `200`

Successful Response

- AgentSession — A persisted chat session, scoped to a user/organization/project.
  - `id` string, required
  - `user_id` string, required
  - `organization_id` string, nullable
  - `project_id` string, nullable
  - `title` string, required
  - `sdk_session_id` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/ionworks/apis/fastapi.md) · [All operations](https://skmtc.dev/ionworks/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ionworks/fastapi/revisions/7337a3cbdaf2/schema)
