Mock a Telegram bot webhook

A POST mock that replies to a Telegram Update with a sendMessage call back to the same chat.

Accepts an incoming call and replies the way the service expects.

Response payload

{
  "method": "sendMessage",
  "chat_id": {{request.body.message.chat.id}},
  "text": "Thanks, got it!"
}

Fields worth knowing

Field What it means
method The Bot API method name that the webhook response itself performs.
chat_id Taken from the incoming Update via {{request.body.message.chat.id}}.
text The reply text; edit it to test a different bot response.

Create the mock

curl -X POST https://quickmock.dev/api/mocks \
  -H 'Content-Type: application/json' \
  -d '{
  "method": "POST",
  "response_status": 200,
  "content_type": "application/json",
  "response_body": "{\"method\":\"sendMessage\",\"chat_id\":{{request.body.message.chat.id}},\"text\":\"Thanks, got it!\"}"
}'

Call it

curl -X POST -H 'Content-Type: application/json' -d '{"update_id":900000001,"message":{"message_id":42,"date":1717200000,"chat":{"id":987654321,"type":"private"},"text":"/start"}}' https://quickmock.dev/m/<slug>

What you get

POST a Telegram Update -> 200 {"method":"sendMessage","chat_id":987654321,"text":"Thanks, got it!"}
the webhook response itself is treated as a Bot API method call

How this differs from the real thing

Telegram's webhook secret token isn't checked — this mock replies to anyone who posts a matching Update, not only to Telegram's own servers.

Ready to use it?

Open it in the mock builder to tweak first

Pairs well with this guide: Echo the request back

← All templates