Full API documentation
Where to find the method reference, code examples, and errors.
MGRAM's full technical documentation is at api.mgram.biz. The Knowledge Base explains scenarios, and the reference covers every method.
What the docs include
- Quick start for bots and for bot factories: which key you need and where to begin.
- Reference of all methods with parameters and responses, searchable by path or name.
- Code examples: pick a method and a language to get ready code and a sample response.
- Errors: one format and what to fix for each HTTP code.
- Webhook check: send a test event to your address right from the docs page.
General API rules
- Plain HTTPS requests with JSON — no SDK needed.
- The base URL is
https://api.mgram.biz. - The key goes in the
Authorization: Bearer KEYheader. - A webhook must be a public HTTPS address and reply 200 or 204. The signature is an HMAC-SHA256 of
timestamp.bodyin theX-MGRAM-Signatureheader.
Types of keys
| Key | What for | Where to get it |
|---|---|---|
| Bot API key | Tasks, statistics, and settings of one bot | Bot card → “Settings” → “API key” |
| Partner API key | Registering and managing a factory's bots | Through Support, by your Telegram ID |
Overview by scenario
- Tasks API — monetizing a bot with tasks.
- Bot statistics and management API — bot data and settings.
- Partner API — for bot factories.
Can't find a method or need help with an integration? Contact Support or the @mgram_chat chat.