Sending & Editing Messages and Media¶
This section details all methods for sending text, photos, videos, voice notes, documents, forwarding, copying, editing, deleting messages, and displaying chat actions (such as typing).
1. Send Text Messages (sendMessage)¶
Sends a text message to a conversation or channel.
POST
https://botapi.codemeet.chat/bot<TOKEN>/sendMessage
Parameters¶
| Parameter | Type | Status | Description |
|---|---|---|---|
chat_id |
String |
Required | Target chat UUID or public username (e.g. @channelusername). |
text |
String |
Required | Text of the message to be sent (up to 32,768 characters). |
parse_mode |
String |
Optional | Formatting mode (HTML, Markdown, MarkdownV2). |
entities |
Array of MessageEntity |
Optional | Array of formatted text entities. |
reply_to_message_id |
Integer |
Optional | Message sequence ID to reply to. |
disable_notification |
Boolean |
Optional | Sends the message silently without triggering alert sounds. |
reply_markup |
Object |
Optional | Inline keyboard, custom reply keyboard, or keyboard removal markup. |
Request Example¶
{
"chat_id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122",
"text": "<b>Your order is confirmed!</b>\nTracking ID: <code>#12345</code>",
"parse_mode": "HTML",
"reply_markup": {
"inline_keyboard": [
[{"text": "Pay Now", "url": "https://example.com/pay"}]
]
}
}
2. Sending Media Files (sendPhoto, sendVideo, sendDocument, sendVoice)¶
Send media files using their uploaded media UUIDs:
sendPhoto: Images and photossendVideo: Video filessendDocument: General files and documentssendVoice: Audio and voice notes
POST
https://botapi.codemeet.chat/bot<TOKEN>/sendPhoto
Parameters¶
| Parameter | Type | Status | Description |
|---|---|---|---|
chat_id |
String |
Required | Target chat ID. |
photo / media_id |
UUID |
Required | Media UUID uploaded to CodeMeet storage. |
caption |
String |
Optional | Media caption (up to 32,768 characters). |
parse_mode |
String |
Optional | Caption formatting mode (HTML or Markdown). |
reply_to_message_id |
Integer |
Optional | Message ID to reply to. |
reply_markup |
Object |
Optional | Keyboards or button markups. |
{
"chat_id": "e9b2a1c0-4411-4fa3-9f88-d4508671b122",
"photo": "3f889c20-a8d2-43bb-a1b4-927181043211",
"caption": "Product Overview"
}
3. Forwarding & Copying Messages (forwardMessage / copyMessage)¶
forwardMessage¶
Forwards a message with original sender attribution:
copyMessage¶
Duplicates a message without attaching a forward header, allowing new captions and reply markups:
{
"chat_id": "destination-chat-id",
"from_chat_id": "source-chat-id",
"message_id": 142,
"caption": "Replacement caption"
}
4. Editing Messages (editMessageText / editMessageCaption / editMessageReplyMarkup)¶
Bots can edit messages previously sent by themselves:
editMessageText¶
{
"chat_id": "chat-id",
"message_id": 25,
"text": "Status: Completed",
"reply_markup": {
"inline_keyboard": [
[{"text": "Back to Menu", "callback_data": "menu"}]
]
}
}
editMessageCaption¶
editMessageReplyMarkup¶
Updates or removes an inline keyboard without modifying text content:
5. Deleting Messages (deleteMessage)¶
Deletes a message from a conversation:
POST
https://botapi.codemeet.chat/bot<TOKEN>/deleteMessage
6. Broadcasting Chat Actions (sendChatAction)¶
Broadcasts temporary status indicators (such as typing or upload_photo) to users in real time:
POST
https://botapi.codemeet.chat/bot<TOKEN>/sendChatAction
Available actions: typing, upload_photo, record_video, upload_video, record_voice, upload_voice, upload_document, choose_sticker, find_location.