People · Developer account

blockBot

Block a bot

This method authenticates with your developer account. The easiest way to call it is the dashboard, which signs the request for you. Direct calls need a dashboard session cookie.

Blocks the bot for the caller (both envs). The bot learns about it through a my_chat_member update queued in each env (old 'member' -> new 'kicked'). Blocking is per bot; the caller can block any non-deleted bot, including their own.

Request

curl https://api.sprintelex.com/blockBot \
  # authenticated with your dashboard session \
  -H "Content-Type: application/json" \
  -d '{"bot_id":"<bot-id>"}'

Parameters

NameTypeRequiredRules
bot_idstringYes-

Response

{ ok: true, result: { blocked: true } }

Rate limit: none in code

Errors

StatusErrorWhen
400bot_id is requiredmissing bot_id
404bot not foundno such bot or deleted
500could not block botDB upsert failed