Telegram Bot API
🌐 English

sendMessageDraft

Category: Messages · Bot API 10.3 · Official documentation

Sends a message draft - temporary preview (Bot API 9.5+).

Returns: On success, returns True.

Parameters

ParameterTypeRequiredDescription
chat_idIntegerYesPrivate chat ID
message_thread_idIntegerOptionalTopic ID (for forums)
draft_idIntegerYesUnique draft ID (non-zero)
textStringOptionalDraft text (0-4096, empty = "Thinking...")
parse_modeStringOptionalHTML, Markdown, MarkdownV2
entitiesArray of MessageEntityOptionalJSON MessageEntity array
can_stopBooleanOptionalShow a button to stop further drafts (Bot API 10.3)
keep_on_stopBooleanOptionalKeep the draft in the chat when the stop button is pressed (Bot API 10.3)

Parameter descriptions are concise summaries; see the official documentation for the full text.

Example request

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendMessageDraft" \
  -H "Content-Type: application/json" \
  -d '{"chat_id":123456789,"draft_id":1}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/sendMessageDraft",
    json={
        "chat_id": 123456789,
        "draft_id": 1
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/sendMessageDraft`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_id": 123456789,
    "draft_id": 1
  }),
});
console.log(await res.json());

Step-by-step guide: Telegram Bot API 10.0–10.3: Rich Messages, Ephemeral Messages, Guest Mode and More