Skip to main content

Message Push

Current Message API​

To send to a specific private chat or group:

  • POST /openapi/bot/sendMessage

Required fields:

  • chat_id
  • chat_type (group | private)
  • content

Optional fields:

  • parse_mode (default richtext)
  • Paid sending v2: 0.12 energy per confirmed successful message, up to 100 admissions per bot per rolling 60 seconds, using the original message parameters, with an API Key, nonce, 13-digit Unix millisecond timestamp and signature required.
  • Energy balance: GET /openapi/bot/energy, requiring an API Key, nonce, a 13-digit Unix millisecond timestamp and signature.
  • Explicit failures such as a bot outside the group return ok=false; do not rely on HTTP status alone. Retrying a timeout may duplicate delivery and charges.

Broadcast to all joined groups​

Use POST /openapi/bot/batchSendMessageToGroups with content and optional parse_mode, title, and reply_markup. No chat_id or chat_type is needed. Content is limited to 2000 UTF-8 bytes and each group costs 0.1 energy. Delivery is asynchronous, so success does not confirm receipt by every group. Success also returns the estimated count, cost, current balance, duration in minutes and summary. See the endpoint reference for fields and errors.

References​