Developers » API methods » Messages » messages.send
Sends a message.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
This method can be called with a community token. Access rights required: messages.
user_idUser ID (by default current user).
random_idUnique identifier to avoid resending the message.
int (number), accessible for versions from 5.45
peer_idDestination ID.

For user:
User ID, e.g. 12345.

For chat:
2000000000 + chat_id, e.g. 2000000001.

For community:
- community ID, e.g. -12345.

accessible for versions from 5.38
accessible for versions from 5.81
domainUser's short address (for example, illarionov).
chat_idID of conversation the message will relate to.
positive number, maximum value 100000000
message(Required if attachments is not set.) Text of the message.
latGeographical latitude of a check-in, in degrees (from -90 to 90).
longGeographical longitude of a check-in, in degrees (from -180 to 180).
attachment(Required if message is not set.) List of objects attached to the message, separated by commas, in the following format:

<type> Type of media attachment:
  • photo photo;
  • video video;
  • audio audio;
  • doc document;
  • wall wall post;
  • market market item.
<owner_id> ID of the media attachment owner.
<media_id> media attachment ID.


reply_toId of replied message.
int (number), accessible for versions from 5.92
forward_messagesID of forwarded messages, separated with a comma. Listed messages of the sender will be shown in the message body at the recipient's.


list of comma-separated numbers, the maximum number of elements allowed is 1000
sticker_idSticker id.
positive number
group_idGroup id for working with community messages with users token.
positive number
keyboardKeyboard object
payloadpayload of message
maximum length 1000
dont_parse_links1 -- links will not attach snippet
flag, either 1 or 0, default
disable_mentions1 -- mention of user will not generate notification for him
flag, either 1 or 0, default
string, default default
positive number, maximum value 100
Show options for only old API versions
user_idsIDs of message recipients (if new conversation shall be started).
outdated option, only for versions before 5.138
guidUnique ID used to prevent re-sending of the same message.
int (number), outdated option, only for versions before 5.46
Returns sent message ID.
If user_ids parameter is used, returns an array of objects containing following fields:
  • peer_id (integer) peer ID;
  • message_id (integer) message ID;
  • error error message, if message is not delivered.
15Access denied
104Not found
900Can't send messages for users from blacklist
901Can't send messages for users without dialogs
902Can't send messages to this user due to their privacy settings
911Keyboard format is invalid
912This is a chat bot feature, change this status in settings
913Too many forwarded messages
914Message is too long
917You don't have access to this chat
921Can't forward these messages
925You are not admin of this chat
936Contact not found
940Too many posts in messages
943Cannot use this intent
944Limits overflow for this intent
945Chat was disabled
946Chat not supported
950Can't send message, reply timed out
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
The template field was added to the message object.
account.getBanned method returns profiles (array) and groups (array) fields. method returns a result in new format.

random_id parameter in messages.send method is obligatory.
groups_can_post field with information whether communities can comment the post has been in post object.
messages.send returns an array of statuses when user_ids parameter is used and community access token was passed.
groups.getCallbackServerSettings, groups.setCallbackServerSettings and groups.setCallbackServer are obsolete.
server_id parameter has been added in methods groups.setCallbackSettings, groups.getCallbackSettings.
messages.send and messages.sendSticker methods use random_id parameter instead guid. account.getPushSettings return peer_id field instead chat_id and user_id. account.setSilenceMode method use peer_id parameter instead chat_id and user_id. messages.getHistoryAttachments method return market items, posts and comments like link attachments.
apps.get apps.getCatalog methods returns photo object for screenshots fields. Add in_read, out_read fields in response of messages.getDialogs, messages.getHistory and messages.getLongPollHistory methods. Add peer_id parameter for messages.send, messages.sendSticker, messages.deleteDialog, messages.setActivity and messages.getHistory methods.