Max Message icon

Max Message

Send, read, update, and answer callbacks for MAX messages

Send Message

AI-generated

Summary

Send a message to a specific user or to a chat/group in Max, optionally including text, attachments, inline keyboard buttons, and message options such as notifications, replies, or forwards.

Inputs

  • sendTo (required) — Select whether to send the message to a 'User' or a 'Chat' (group).
  • userId (required) — The ID of the user to send the message to (required if sending to a user).
  • chatId (required) — The ID of the chat/group to send the message to (required if sending to a chat).
  • text — The textual content of the message (max 4000 characters). Can be empty if sending a file.
  • format — Format of the message text: Plain Text, HTML, or Markdown.
  • additionalFields — Optional parameters including attachments (files, images, audio, video, specified via binary data, URL, or token), disabling link previews, inline keyboard buttons (customizable multi-row buttons with various actions and styles), message notification toggle, reply to a message ID, and forwarding an existing message ID.

Output shape

a JSON object containing the result of the send message API call, usually including message metadata such as message ID and status

The operation supports sending multiple attachments and rich inline keyboards. The text field may be left empty if files are included. Notifications can be enabled or disabled. Reply and forward message IDs allow threading or forwarding functionality. The output follows the Max API's send message response format.

Examples

Example 1: Send a text message to a user

Set 'Send To' to User, provide the user ID, enter message text, and optionally configure format and notification.

Example 2: Send a message with image attachment to a chat

Set 'Send To' to Chat, provide the chat ID, add an attachment with binary or URL source, and optionally include text and inline keyboard buttons.

Links

Discussion