---
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.

---

[API](https://skmtc.net/qredence/apis/fleet-rlm.md) · [All operations](https://skmtc.net/qredence/apis/fleet-rlm/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/qredence/fleet-rlm/versions/62e8c152aa18/schema)
