Skip to content

deleteMessages

Delete multiple messages at once. A maximum of 100 messages can be deleted per request.

Request

POST /:token/deletemessages

Parameters

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier for the target chat or username
message_idsInteger[]YesList of message identifiers to delete (maximum 100)

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 or has exceeded the deletion time limit