pinChatMessage
Add a message to a chat's pinned messages so important content stays visible. Specify the chat and message IDs; bots need pin or edit rights in groups and channels.
Instructions
Use this method to add a message to the list of pinned messages in a chat. In private chats and channel direct messages chats, all non-service messages can be pinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to pin messages in groups and channels respectively. Returns True on success.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"chat_id": "<chat_id>",
"message_id": "<message_id>"
},
"name": "pinChatMessage"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chat_id | Yes | Unique identifier for the target chat or username of the target channel in the format `@username` | |
| message_id | Yes | Identifier of a message to pin | |
| disable_notification | No | Pass True if it is not necessary to send a notification to all chat members about the new pinned message. Notifications are always disabled in channels and private chats. | |
| business_connection_id | No | Unique identifier of the business connection on behalf of which the message will be pinned |