---
title: "Update session"
method: PUT
path: "/api/sessions/{sessionId}"
tags: ["Sessions"]
---

# Update session

`PUT /api/sessions/{sessionId}`

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/sessions/{sessionId}`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

Updates session metadata (title, summary) or appends messages. Only the session owner (same user + org) can update it.

## Path parameters

- `sessionId` string, required

## Headers

- `X-Grafana-Org-Id` string

## Request body

- object
  - `messages` SessionMessage[]: Messages to append (optional)
    - `role` 'user' | 'assistant', required: Message role
    - `content` string, required: Message text content
    - `toolCalls` object, nullable: Tool calls made (raw JSON)
    - `pageRefs` object, nullable: Page references (raw JSON)
  - `title` string: New session title (optional)
  - `summary` string: New session summary (optional)

## Response `200`

Session updated

- object
  - `success` boolean

## Other responses

- `400`: Bad request (invalid parameters or malformed request body)
- `401`: Unauthorized (missing or invalid authentication)
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
