---
title: "更新会话"
method: PUT
path: "/sessions/{id}"
tags: ["会话"]
---

# 更新会话

`PUT /sessions/{id}`

更新会话属性

## Path parameters

- `id` string, required

## Request body

- GithubComTencentWeKnoraInternalTypesSession
  - `created_at` string
  - `deleted_at` GormDeletedAt
    - `time` string
    - `valid` boolean — Valid is true if Time is not NULL
  - `description` string — Description
  - `id` string — ID
  - `tenant_id` integer — Tenant ID
  - `title` string — Title
  - `updated_at` string

## Response `200`

更新后的会话

- object

## Other responses

- `404` — 会话不存在

## Changes

- **2025-12-22** `e625bcd5b8b9` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was added to the API
- **2025-12-16** `edf61e68559d` — 1 info
  - the endpoint scheme security `ApiKeyAuth` was removed from the API

[Change history](https://skmtc.dev/tencentblueking/apis/weknora-api/changes/sessions/:id/put.md)

---

[API](https://skmtc.dev/tencentblueking/apis/weknora-api.md) · [All operations](https://skmtc.dev/tencentblueking/apis/weknora-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tencentblueking/weknora-api/revisions/08f8a25fbf1d/schema)
