La API de Mensajes te permite enviar varios tipos de mensajes a chats de Telegram, incluyendo texto, fotos, documentos y más. También puedes difundir mensajes a múltiples chats simultáneamente.
Tipos de mensajes soportados
Texto
Texto plano con soporte de markdown
Foto
Imágenes con leyenda opcional
Documento
Archivos de hasta 50MB
Video
Archivos de video con streaming
Voz
Mensajes de audio
Endpoints
POST
/api/messages/sendEnviar un mensaje de texto a un chat
botIdchatIdtextparseMode
POST
/api/messages/send-photoEnviar una foto a un chat
botIdchatIdphotocaption
POST
/api/messages/send-documentEnviar un documento/archivo a un chat
botIdchatIddocumentcaption
POST
/api/messages/broadcastEnviar un mensaje a múltiples chats
botIdchatIdstextdelay
GET
/api/messages/:chatIdObtener historial de mensajes de un chat
chatIdlimitbefore
Ejemplo: Enviar un mensaje
curl -X POST https://api.botlaunch.io/api/messages/send \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"botId": "bot_abc123",
"chatId": "-100123456789",
"text": "Hello from BotLaunch!",
"parseMode": "Markdown"
}'