Skip to content

pinChatMessage

Pin a message in a chat.

Request

POST /:token/pinchatmessage

Parameters

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier for the target chat or username
message_idIntegerYesIdentifier of the message to pin
disable_notificationBooleanNoWhether to pin the message silently without sending a notification

Response

Returns Boolean true on success.

json
{
  "ok": true,
  "result": true
}

Error Codes

CodeDescription
400Bad request parameters
401Invalid token
403Bot does not have permission to perform this action
404Message does not exist