Telegram Bot API
🌐 Español

sendChecklist

Categoría: Mensajes · Bot API 10.3 · Documentación oficial

Envía una lista de tareas en nombre de una cuenta empresarial.

Devuelve: Si la llamada tiene éxito, devuelve Message.

Parámetros

ParámetroTipoObligatorioDescripción
business_connection_idStringSíID de la conexión empresarial
chat_idInteger or StringSíID del chat o @username
checklistInputChecklistSíObjeto JSON InputChecklist
disable_notificationBooleanOpcionalEnviar sin sonido
protect_contentBooleanOpcionalProteger el contenido
message_effect_idStringOpcionalID del efecto del mensaje
reply_parametersReplyParametersOpcionalObjeto JSON ReplyParameters
reply_markupInlineKeyboardMarkupOpcionalObjeto JSON InlineKeyboardMarkup

Las descripciones de los parámetros son resúmenes breves; consulta la documentación oficial para ver el texto completo.

Ejemplo de solicitud

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendChecklist" \
  -H "Content-Type: application/json" \
  -d '{
  "business_connection_id": "BUSINESS_CONNECTION_ID",
  "chat_id": 123456789,
  "checklist": {
    "title": "Today",
    "tasks": [
      {
        "id": 1,
        "text": "Write code"
      }
    ]
  }
}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/sendChecklist",
    json={
        "business_connection_id": "BUSINESS_CONNECTION_ID",
        "chat_id": 123456789,
        "checklist": {
            "title": "Today",
            "tasks": [
                {
                    "id": 1,
                    "text": "Write code"
                }
            ]
        }
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/sendChecklist`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "business_connection_id": "BUSINESS_CONNECTION_ID",
    "chat_id": 123456789,
    "checklist": {
      "title": "Today",
      "tasks": [
        {
          "id": 1,
          "text": "Write code"
        }
      ]
    }
  }),
});
console.log(await res.json());

Guía paso a paso: Cómo crear un bot en Telegram paso a paso: de BotFather a tu primer mensaje