---
title: "Pin / unpin a message"
locale: en
url: https://tlg.builera.app/en/docs/reference/rest/messages.pin
verified: 2026-10-24
app_version: "2.0"
generated: true
---

# Pin / unpin a message

Pin a message at the top of the chat (or unpin it). In private chats `oneSide` pins it only for this account.

Pin a message at the top of the chat (or unpin it). In private chats `oneSide` pins it only for this account.

## Overview

| Name | Value |
| --- | --- |
| Code | `messages.pin` |
| Scope needed | `messages.manage` |
| Risk | Write |
| May need confirmation | No |
| Runs as | Queues work for a node |
| Needs `Idempotency-Key` | Yes |
| Member roles allowed | `owner`, `manager`, `agent` |
| Needs a worker from version | `1.0.15` |
| In the app | Inbox → message menu → Pin |

## Input fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `messageId` | `uuid` | Yes |   |
| `unpin` | `true/false` | No |   |
| `oneSide` | `true/false` | No |   |

## Example request

```bash
curl -X POST https://tlg.builera.app/api/public/v2/ops/messages.pin \
  -H "Authorization: Bearer $TELEGRAM_AUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: <unique key per operation>" \
  -d '{"messageId":"00000000-0000-0000-0000-000000000000"}'
```

## Output fields (`data`)

| Field | Type | Required |
| --- | --- | --- |
| `ok` | `true` | Yes |
| `jobId` | `text` | Yes |

## Example answer

```json
{
  "data": {
    "ok": true,
    "jobId": "00000000-0000-4000-8000-000000000000"
  }
}
```

## Using it over MCP

Not listed on any profile: call `tools_describe` then `tools_run` with `code: "messages.pin"`. Tool name when listed: `messages_pin`.
