Skip to content

copyMessage

Copy a message from one chat to another.

Request

POST /:token/copymessage

Parameters

ParameterTypeRequiredDescription
chat_idInteger/StringYesUnique identifier for the target chat or username
from_chat_idInteger/StringYesUnique identifier for the source chat or username
message_idIntegerYesIdentifier of the message to copy
captionStringNoNew caption replacing the original text/caption of the message. Treated as plain text; format entities of the original message are removed
parse_modeStringNoHas no effect in the current version: the caption is not parsed for formatting (see Formatting Options for the styles)
caption_entitiesMessageEntity[]NoHas no effect in the current version
reply_markupObjectNoCustom reply markup

Response

Returns a MessageId object array on success.

json
{
  "ok": true,
  "result": [
    {
      "message_id": 12345
    }
  ]
}

Error Codes

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