---
title: "Update session pinned"
method: PATCH
path: "/api/chat/sessions/{session_id}/pinned"
tags: ["v2", "chat", "chat"]
---

# Update session pinned

`PATCH /api/chat/sessions/{session_id}/pinned`

Pin or unpin a chat session.

Pinned sessions surface at the top of the user's sidebar list ahead of
unpinned ones, regardless of recency.

Args:
    session_id: The session ID to update.
    request: Request body containing the new pin state.
    user_id: The authenticated user's ID.

Returns:
    dict: Status of the update.

Raises:
    HTTPException: 404 if session not found or not owned by user.

## Path parameters

- `session_id` string, required

## Request body

- UpdateSessionPinnedRequest — Request model for pinning/unpinning a session.
  - `is_pinned` boolean, required

## Response `200`

Successful Response

- object

## Other responses

- `401` — Authentication required
- `404` — Session not found or access denied
- `422` — Validation Error

## Changes

- **2026-07-01** `6415527178e0` — 1 info
  - endpoint added
- **2026-04-30** `8c84efcb3afb` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/changes/api/chat/sessions/:session_id/pinned/patch.md)

---

[API](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server.md) · [All operations](https://skmtc.dev/significant-gravitas/apis/autogpt-agent-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/significant-gravitas/autogpt-agent-server/revisions/5dc375899754/schema)
