---
title: "Set the pinned documents"
method: PUT
path: "/pins"
tags: ["Pinned documents"]
---

# Set the pinned documents

`PUT /pins`

## Request

- Base URL: `https://app.jitprompt.com`
- URL: `https://app.jitprompt.com/pins`
- Auth: HTTP bearer

Replace the pinned list with these documents, in this order: ids (full
or the 8-character prefix the tools show) or file names (`source_name`,
with or without the extension). An empty list unpins everything. 422 if
the block would pass the cap.

## Request body

- PinOrder
  - `documents` string[], required

## Response `200`

Successful Response

- Pins
  - `pins` PinnedDocument[], required
    - `id` string, required
    - `title` string, required
    - `source_name` string, required
    - `status` string, required
    - `est_tokens` integer, required
    - `included` boolean, required
  - `total_tokens` integer, required
  - `cap` integer, required
  - `max` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jitprompt/apis/jitprompt-api.md) · [All operations](https://skmtc.dev/jitprompt/apis/jitprompt-api/llms.txt) · [OpenAPI document](https://skmtc.dev/jitprompt/apis/jitprompt-api/revisions/394bd8fb9f92?raw)
