---
title: "Pin message"
method: PUT
path: "/chats/{chatId}/pin"
tags: ["chats"]
---

# Pin message

`PUT /chats/{chatId}/pin`

## Request

- Base URL: `https://botapi.tamtam.chat`
- URL: `https://botapi.tamtam.chat/chats/{chatId}/pin`
- Auth: API key in query parameter `access_token`

Pins message in chat or channel.

## Path parameters

- `chatId` integer, required

## Request body

- PinMessageBody
  - `message_id` string, required: Identifier of message to be pinned in chat
  - `notify` boolean, nullable: If `true`, participants will be notified with system message in chat/channel

## Response `200`

Success or not result

- SimpleQueryResult: Simple response to request
  - `success` boolean, required: `true` if request was successful. `false` otherwise
  - `message` string: Explanatory message if the result is not successful

## Other responses

- `401`: Authorization Error. No `access_token` provided or token is invalid
- `403`: Access error. You don't have permissions to access this resource
- `404`: Requested resource is not found
- `500`: Internal Server Error

## Changes

- **2020-04-07** `9862f33d4352`: 1 info
  - the `notify` request property default value changed from `false` to `true`
- **2020-04-02** `961364529394`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/tamtam/apis/tamtam-bot-api/changes/chats/:chatId/pin/put.md)

---

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