Skip to content
MGRAMKnowledge Base

Partner API

For bot factories: registering client bots and managing them.

Updated October 16, 20262 min read3 views

The Partner API is for bot factories and services that create bots for clients. It lets you connect bots to MGRAM and manage them from your server — without manual steps in @mgram_robot.

How to get access

  1. Your Partner ID is your Telegram ID.
  2. Send it to Support in @mgram_robot and describe what you need access for.
  3. You'll get a Partner API key. It's shown once — store it safely.

Requests go to https://api.mgram.biz with the header Authorization: Bearer YOUR_PARTNER_API_KEY.

Capabilities

MethodWhat it does
POST /register/botRegisters a bot by token. You become the owner by default, or you can specify a client account
GET /register/botsThe list of your bots with moderation statuses, including bots on client accounts
POST /register/bots/settingsTurns broadcasts and Reply Ads on or off for a group of bots — up to 500 per request
POST /register/bot/reply-adsTurns Reply Ads on or off for one bot
POST /register/webhook/testSends a test event to your HTTPS address

When a bot is registered, the response contains its Bot API key — also shown once. Use it for the bot's statistics and tasks, see Bot statistics and management API and Tasks API.

How connection works

  1. You register the bot via POST /register/bot.
  2. The bot goes through regular MGRAM moderation.
  3. The status and, if rejected, the reason are shown in GET /register/bots — or you receive the moderation decision via webhook.

Rules

  • Bots are registered under the same rules as manual ones: a live audience, an honest category, no fake activity.
  • Bulk operations are atomic: if at least one bot isn't yours, none are changed.
  • The Partner API key gives access to all your bots — keep it only on your server.

The full description of methods, errors, and webhooks is at api.mgram.biz.