---
title: "Patch session metadata"
method: PATCH
path: "/api/v1/sessions/{session_id}"
tags: ["sessions"]
---

# Patch session metadata

`PATCH /api/v1/sessions/{session_id}`

Update session title and/or metadata_json. Returns the updated session snapshot.

## Path parameters

- `session_id` string, required — Identifier of the session to update.

## Request body

- SessionPatchRequest — Patch body for updating session metadata.
  - `title` string, nullable — New human-readable session title.
  - `metadata_json` object, nullable — New metadata dictionary to merge or replace session metadata.

## Response `200`

Successful Response

- SessionDetailResponse — Full session detail with turn count.
  - `id` string, required — Durable session identifier.
  - `title` string, required — Human-readable session title.
  - `status` string, required — Session status (active, archived).
  - `model_name` string, nullable — Model used in session.
  - `external_session_id` string, nullable — Canonical runtime session identifier.
  - `workspace_id` string, nullable — Workspace context.
  - `turn_count` integer, required — Total number of turns in this session.
  - `created_at` string, required — ISO-8601 creation timestamp.
  - `updated_at` string, required — ISO-8601 last-update timestamp.

## Other responses

- `401` — Authentication is required or the provided token is invalid.
- `403` — The caller does not have permission to access this resource.
- `404` — Session not found.
- `422` — Validation Error
- `503` — Session services are unavailable because server startup is incomplete.

## Changes

- **2026-05-23** `6178f925cdec` — 1 breaking, 3 info
  - the `detail` response's property type/format changed from `array`/`` to ``/`` for status `422`
  - added `subschema #1, subschema #2` to the `detail` response property `anyOf` list for the response status `422`
  - added the required property `code` to the response with the `422` status
  - added the required property `message` to the response with the `422` status
- **2026-04-23** `17ec642c8b7f` — 1 info
  - endpoint added
- **2026-03-19** `78507b29ed8f` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/qredence/apis/fleet-rlm/changes/api/v1/sessions/:session_id/patch.md)

---

[API](https://skmtc.dev/qredence/apis/fleet-rlm.md) · [All operations](https://skmtc.dev/qredence/apis/fleet-rlm/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qredence/fleet-rlm/revisions/e25aaded81b9/schema)
