Skip to main content
POST
/
api
/
messages
/
send
Send a message
curl --request POST \
  --url http://localhost:8080/api/messages/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bot_id": 1,
  "chat_id": -100123456789,
  "text": "Hello from BotMux!"
}
'
{
  "id": 123,
  "chat_id": 123,
  "bot_id": 123,
  "user_id": 123,
  "username": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "text": "<string>",
  "date": 123,
  "media_type": "<string>",
  "file_id": "<string>",
  "reply_to_message_id": 123
}

Authorizations

Authorization
string
header
required

API key with bmx_ prefix. Obtain via /api/auth/api-keys.

Body

application/json
bot_id
integer
required

Bot to send from

chat_id
integer
required

Target chat

text
string
required

Message text

reply_to_message_id
integer

Optional message ID to reply to

Response

Message sent and saved

id
integer

Telegram message ID

chat_id
integer

Chat ID

bot_id
integer

Bot ID that received/sent this message

user_id
integer

Sender user ID

username
string

Sender username

first_name
string

Sender first name

last_name
string

Sender last name

text
string

Message text content

date
integer

Unix timestamp of the message

media_type
string

Media type if the message contains media (photo, video, animation, sticker, voice, audio, document, video_note)

file_id
string

Telegram file ID for media messages

reply_to_message_id
integer

ID of the message this is a reply to