---
title: "PATCH /personal/users/{userId}/pinned"
method: PATCH
path: "/personal/users/{userId}/pinned"
tags: ["user-data"]
---

# PATCH /personal/users/{userId}/pinned

`PATCH /personal/users/{userId}/pinned`

## Request

- Base URL: `http://localhost:3000/api`
- URL: `http://localhost:3000/api/personal/users/{userId}/pinned`
- Auth: HTTP bearer

Replaces the user's pinned entries with the provided typed entries

## Path parameters

- `userId` string, required

## Request body

- PinnedEntriesInput
  - `pinned` PinnedEntry[], required
    - `type` 'bookmark' | 'note' | 'collection', required
    - `id` string, required: id of the pinned bookmark, note, or collection

## Response `200`

OK

- object
  - `userDataPinnedUpdated` boolean

## Other responses

- `400`: Bad request, validation errors
- `401`: unauthorized (you need to have a valid token) and userId must match the subject in token
- `403`: Access token is missing or invalid

## Changes

- **2026-10-11** `2e4025e7a3dc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/codeverdotdev/apis/codever-api/changes/personal/users/:userId/pinned/patch.md)

---

[API](https://skmtc.dev/codeverdotdev/apis/codever-api.md) - [All operations](https://skmtc.dev/codeverdotdev/apis/codever-api/llms.txt) - [OpenAPI document](https://skmtc.dev/codeverdotdev/apis/codever-api/revisions/d5a3297e4da7?raw)
