unpinChatMessage
Removes a message from a chat's pinned messages, letting you target a specific message ID or the latest pinned item. Use it to clear outdated pins.
Instructions
Use this method to remove a message from the list of pinned messages in a chat. In private chats and channel direct messages chats, all messages can be unpinned. Conversely, the bot must be an administrator with the 'can_pin_messages' right or the 'can_edit_messages' right to unpin 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>"
},
"name": "unpinChatMessage"
}
}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 | No | Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned. | |
| business_connection_id | No | Unique identifier of the business connection on behalf of which the message will be unpinned |