The translation was generated automatically and may contain mistakes

Personal Message

The API version is 5.80.

The object describing the private message contains the following fields:

id

integer Message ID.

date

integer Time to send to Unixtime.

peer_id

integer The destination ID.

from_id

integer Sender ID.

message

string Text of the message.

format_data

object Information on the formatting of the text of the message. An object that contains fields:

  • •
    version ( string The formatting version.
  • •
    items ( array ) — an array of objects with formatting parameters:
    • •
      offset ( integer ) is the position of the symbol from which the specified formatting type is applied.
    • •
      length ( integer ) — the number of characters covered by the specified formatting type.
    • •
      type ( string ) is a formatting type applied to a range of characters. Possible values:
      • •
        bold - semi-fat.
      • •
        italic - Italic.
      • •
        url - reference.
      • •
        underline underlined.
    • •
      url ( string (b) the address of the reference, if type The type is url .

A UTF-16 character is taken as a unit of range. Note that some objects, such as emojis, can occupy multiple characters in UTF-16.

random_id

integer An identifier used when sending a message. Returns only for outgoing messages.

ref

string Arbitrary parameter for working with sources of Transition .

ref_source

string Arbitrary parameter for working with sources of Transition .

attachments

array Media attachments of the message (photos, links, etc.). Description of the array attachments is located on a separate page .

important

boolean true if the message is marked as important.

geo

object Information on location .

payload

string Service field for messages to bots (payload).

keyboard

object Keyboard object for bots.

fwd_messages

array An array of messages sent (if any). Maximum number of elements — 100 . Maximum nesting depth for forwarded messages 45 the total maximum quantity in the chain, taking into account the investment,, 500 .

reply_message

object A message to which the current one is sent.

action

object Information about the service action with chat. An object that contains fields:

  • •
    type ( string (a) Type of action. Possible values:
    • •
      chat_photo_update - Updated photo of the conversation;
    • •
      chat_photo_remove - deleted the photo of the conversation;
    • •
      chat_create A conversation has been created;
    • •
      chat_title_update - the name of the conversation was updated;
    • •
      chat_invite_user The user is invited;
    • •
      chat_kick_user Excluded user;
    • •
      chat_pin_message — the message is fixed;
    • •
      chat_unpin_message The message is deleted;
    • •
      chat_invite_user_by_link - the user joined the conversation by reference.
  • •
    member_id ( integer User ID (if > 0) or email (if < 0) invited or excluded (for service messages with type = chat_invite_user or chat_kick_user ). The user ID that fixed/unpinned the message to action = chat_pin_message or chat_unpin_message .
  • •
    text ( string ) — the name of the conversation (for official messages with type = chat_create or chat_title_update ).
  • •
    email ( string e-mail, which was invited or excluded (for official messages from type = chat_invite_user or chat_kick_user and negative member_id ).
  • •
    photo ( object ) — the image-cover chat. An object that contains fields:
    • •
      photo_50 ( string The image URL is 50x50px..
    • •
      photo_100 ( string The image URL is 100x100px..
    • •
      photo_200 ( string The image URL is 200x200px..

admin_author_id

integer Only for community messages. Contains the identifier of the user (community administrator) who sent this message.

conversation_message_id

integer A unique automatically increasing number for all messages with this peer.

is_cropped

boolean This message is cropped for the bot.

members_count

integer Number of participants.

update_time

integer The date the message was updated on Unixtime.

was_listened

boolean Whether the enclosed audio message has already been listened to by you.

pinned_at

integer The date the message was fixed on Unixtime.

message_tag

string A line to match Notify and VKontakte user.. The data is copied at the time the user responds to the message from Notify sent with the parameter session_id . More about Notify: https://notify.mail.ru/

API versions below 5.80

id

integer Message ID (not returned for messages sent).

user_id

integer The user ID in the dialog with which the message is located.

from_id

integer Author ID. A positive number.

date

integer Date the message was sent in Unixtime format.

read_state

integer Status of communication ( 0 not read, 1 — read, not returned for messages sent).

ref

string Arbitrary parameter for working with sources of Transition .

ref_source

string Arbitrary parameter for working with sources of Transition .

out

integer Type of communication ( 0 received, 1 - sent, not returned for messages sent).

title

string The title of the message or conversation.

body

string Text of the message.

geo

object Information on location .

attachments

array Media attachments of the message (photos, links, etc.). Description of the array attachments is located on a separate page .

fwd_messages

array An array of messages sent (if any). Maximum number of elements — 100 . Maximum nesting depth for forwarded messages 45 the total maximum quantity in the chain, taking into account the investment,, 500 .

emoji

integer Are they in the message emoji -Smiles.

important

integer Whether the message is important.

deleted

integer Is the message deleted??

random_id

integer An identifier used when sending a message. Returns only for outgoing messages.

Additional fields in messages from multidialogues

chat_id

integer The conversation ID.

chat_active

array Identifiers of the authors of the latest conversation messages ( integer ).

push_settings

Set up notifications for conversation, if any.

users_count

integer Number of participants in the conversation.

admin_id

integer The creator of the conversation.

action

string Type of action (if it is a service message). Possible values:

  • •
    chat_photo_update - Updated photo of the conversation;
  • •
    chat_photo_remove - deleted the photo of the conversation;
  • •
    chat_create A conversation has been created;
  • •
    chat_title_update - the name of the conversation was updated;
  • •
    chat_invite_user The user is invited;
  • •
    chat_kick_user Excluded user.
  • •
    chat_pin_message — the message is fixed;
  • •
    chat_unpin_message The message is deleted;
  • •
    chat_invite_user_by_link - the user joined the conversation by reference.

action_mid

integer User ID (if > 0) or email (if < 0) invited or excluded (for service messages with action = chat_invite_user , chat_invite_user_by_link or chat_kick_user ). The user ID that fixed/unpinned the message to action = chat_pin_message or chat_unpin_message .

action_email

string Email that was invited or excluded (for service messages with action = chat_invite_user or chat_kick_user and negative action_mid ).

action_text

string Title of the interview (for official communications with action = chat_create or chat_title_update ). Text of the attached communication for action = chat_pin_message .

photo_50

string The URL of the interview photo is 50 px wide.

photo_100

string The URL of the interview photo is 100 px wide.

photo_200

string The URL of the interview photo is 200 px wide.