Reyta Bot API

Build chat bots on Reyta over a simple HTTPS API. It mirrors the Telegram Bot API, so the methods, parameters, and JSON responses you already know work here unchanged – and an existing bot moves over by changing one line.

Introduction

The Bot API is a set of HTTPS endpoints. Each call is the base URL, then your bot token, then a method name. You send parameters; you get back JSON. There is nothing else to install on the server side – any language with an HTTP client can talk to it.

Endpoint shape
https://api.reyta.uz/bot<token>/METHOD_NAME

Every response has the same envelope: a boolean ok, and either a result on success or an error_code plus a human-readable description on failure.

JSONResponse envelope
{ "ok": true,  "result": { ... } }
{ "ok": false, "error_code": 401, "description": "Unauthorized" }

Get a token by creating a bot with BotMother. That token is the only credential you need – treat it like a password.

Quick start

Call getMe to confirm your token and see your bot. Paste this into a terminal (replace <token>):

ShellRequest
curl "https://api.reyta.uz/bot<token>/getMe"
JSONResponse
{
  "ok": true,
  "result": {
    "id": 770001,
    "is_bot": true,
    "first_name": "My Bot",
    "username": "my_bot"
  }
}

That is the whole model: swap getMe for any method below, add its parameters, and read the JSON back.

Authorization

The token goes directly in the request path – there is no separate header or OAuth step. Keep it secret: anyone who has it can control the bot. If it leaks, revoke and reissue it in BotMother.

ShellVerify a token
curl "https://api.reyta.uz/bot<token>/getMe"

Making requests

Send parameters as a query string, form-encoded body (application/x-www-form-urlencoded), or JSON (application/json). To upload a file, use multipart/form-data. Both GET and POST work for most methods.

ShellRequest with JSON body
curl "https://api.reyta.uz/bot<token>/sendMessage" \
  -H "Content-Type: application/json" \
  -d '{"chat_id": 987654321, "text": "Hello from Reyta"}'

Migrate from Telegram

Because the surface matches the Telegram Bot API, migration is not a rewrite – it is a configuration change. Point your library’s API root at Reyta and use a token from BotMother. Your method calls, update handling, and types stay exactly the same. Here are the one-line changes for popular libraries (grammY and Telegraf are verified against this endpoint).

grammY (Node / TypeScript)

TypeScriptgrammy.ts
import { Bot } from "grammy";

const bot = new Bot("<token>", {
  client: { apiRoot: "https://api.reyta.uz" },
});

console.log(await bot.api.getMe());

Telegraf (Node / TypeScript)

TypeScripttelegraf.ts
import { Telegraf } from "telegraf";

const bot = new Telegraf("<token>", {
  telegram: { apiRoot: "https://api.reyta.uz" },
});

console.log(await bot.telegram.getMe());

python-telegram-bot

Pythonbot.py
from telegram.ext import ApplicationBuilder

app = (
    ApplicationBuilder()
    .token("<token>")
    .base_url("https://api.reyta.uz/bot")
    .build()
)

Any other library or raw HTTP

If your library exposes an API base URL, host, or apiRoot option, set it to https://api.reyta.uz. If you call the API directly, just change the host:

Base URL
- https://api.telegram.org/bot<token>/sendMessage
+ https://api.reyta.uz/bot<token>/sendMessage

Send a message

To message a user or chat you need its chat_id. The simplest way to get one: send your bot a message, then read it back with getUpdates – the chat.id is in the response. Then:

ShellsendMessage
curl "https://api.reyta.uz/bot<token>/sendMessage" \
  -d "chat_id=987654321" \
  -d "text=Salom! My bot is live on Reyta." \
  -d "parse_mode=HTML"

Add an inline keyboard, reply to a message, or attach media with the parameters listed under each method below.

Getting updates

Receive incoming events by long polling or webhook. Pick one – they are mutually exclusive.

POST/bot<token>/getUpdatesArray of Update

Poll for new updates using long polling. Returns an array of Update objects.

ParameterTypeRequiredDescription
offsetIntegerOptionalIdentifier of the first update to return. Set to last received update_id + 1 to confirm.
limitIntegerOptionalNumber of updates to retrieve, 1–100. Default 100.
timeoutIntegerOptionalLong-polling timeout in seconds. 0 for short polling (testing only).
allowed_updatesArray of StringOptionalList of update types to receive, e.g. ["message","callback_query"].
ShellRequest
curl "https://api.reyta.uz/bot<token>/getUpdates" \
  -d "timeout=30&offset=1"
JSONResponse
{
  "ok": true,
  "result": [
    {
      "update_id": 100001,
      "message": {
        "message_id": 42,
        "from": { "id": 987654321, "is_bot": false, "first_name": "Aziz" },
        "chat": { "id": 987654321, "type": "private" },
        "date": 1783900000,
        "text": "/start"
      }
    }
  ]
}
POST/bot<token>/setWebhookTrue

Register an HTTPS URL to receive updates via push. Reyta delivers each update as a JSON POST.

ParameterTypeRequiredDescription
urlStringYesHTTPS URL to send updates to. An empty string removes the webhook.
secret_tokenStringOptional1–256 chars; echoed back in the X-Telegram-Bot-Api-Secret-Token header so you can verify requests.
allowed_updatesArray of StringOptionalUpdate types to receive.
max_connectionsIntegerOptionalMax simultaneous HTTPS connections for delivery, 1–100. Default 40.
ShellRequest
curl "https://api.reyta.uz/bot<token>/setWebhook" \
  -d "url=https://your-bot.example/hook&secret_token=s3cr3t"
JSONResponse
{ "ok": true, "result": true, "description": "Webhook was set" }
POST/bot<token>/deleteWebhookTrue

Remove the webhook and switch back to getUpdates.

GET/bot<token>/getWebhookInfoWebhookInfo

Current webhook status, pending update count, and last error.

Sending messages

Deliver text, media, and everyday content to any chat the bot can reach.

POST/bot<token>/sendMessageMessage

Send a text message. Supports Markdown/HTML formatting and inline keyboards.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique chat identifier or @username of a channel.
textStringYesMessage text, 1–4096 characters.
parse_modeStringOptional"MarkdownV2" or "HTML" for entity formatting.
reply_markupObjectOptionalInline keyboard, reply keyboard, or force-reply.
disable_notificationBooleanOptionalSend silently, without a notification sound.
ShellRequest
curl "https://api.reyta.uz/bot<token>/sendMessage" \
  -d "chat_id=987654321" \
  -d "text=Salom! Reyta Bot API is live." \
  -d "parse_mode=HTML"
JSONResponse
{
  "ok": true,
  "result": {
    "message_id": 43,
    "chat": { "id": 987654321, "type": "private" },
    "date": 1783900050,
    "text": "Salom! Reyta Bot API is live."
  }
}
POST/bot<token>/sendPhotoMessage

Send a photo by file_id, HTTP URL, or multipart upload.

ParameterTypeRequiredDescription
chat_idInteger or StringYesTarget chat.
photoString or InputFileYesfile_id, an HTTPS URL, or an uploaded file.
captionStringOptionalCaption, 0–1024 characters.
POST/bot<token>/forwardMessageMessage

Forward a message of any kind from one chat to another.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
from_chat_idInteger or StringYesChat the original message comes from.
message_idIntegerYesIdentifier of the message.
POST/bot<token>/copyMessageMessageId

Copy a message without a forward header.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
from_chat_idInteger or StringYesChat the original message comes from.
message_idIntegerYesIdentifier of the message.
captionStringOptionalNew caption. If omitted, the original caption is kept.
parse_modeStringOptionalFormatting of the new caption: HTML, Markdown, or MarkdownV2.
POST/bot<token>/sendDocumentMessage

Send a general file, up to the configured size limit.

POST/bot<token>/sendVideoMessage

Send an MP4 video.

POST/bot<token>/sendAnimationMessage

Send a GIF or H.264/MPEG-4 animation without sound.

POST/bot<token>/sendAudioMessage

Send an audio file to be shown in the music player.

POST/bot<token>/sendVoiceMessage

Send a voice message (OGG/OPUS).

POST/bot<token>/sendVideoNoteMessage

Send a rounded, square video note.

POST/bot<token>/sendMediaGroupArray of MessagePartial support

Send a group of photos/videos/documents as an album.

Returns the full array now, each item with from, date and media_group_id. The per-item media object (photo/video) is not echoed in the response yet – read the album via getUpdates if you need it.

POST/bot<token>/sendLocationMessage

Send a point on the map; can be a live location.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
latitudeFloatYesLatitude of the location.
longitudeFloatYesLongitude of the location.
live_periodIntegerOptionalSeconds the location stays live, 60-86400. Omit for a one-shot location.
POST/bot<token>/sendVenueMessage

Send information about a venue.

POST/bot<token>/sendContactMessage

Send a phone contact.

POST/bot<token>/sendPollMessageNot available yet

Send a native poll or quiz.

Not implemented yet – returns 501. Polls are not supported on the server side.

POST/bot<token>/sendDiceMessage

Send an animated emoji with a random value.

POST/bot<token>/sendChatActionTrue

Show a "typing…" or "uploading…" status.

POST/bot<token>/sendStickerMessageNot available yet

Send a static, animated, or video sticker.

Not implemented yet – returns 501. The sticker send path lands with a later phase; retry once it does.

POST/bot<token>/copyMessagesArray of MessageId

Copy several messages at once without a link to the original.

POST/bot<token>/forwardMessagesArray of MessageId

Forward several messages at once, keeping the original author.

Updating & deleting

POST/bot<token>/editMessageTextMessage or TruePartial support

Edit the text of a sent or inline message.

Editing by inline_message_id is not supported yet – returns 501. Editing by chat_id + message_id works.

ParameterTypeRequiredDescription
textStringYesNew text of the message.
chat_idInteger or StringOptionalTarget chat. Required unless inline_message_id is used.
message_idIntegerOptionalMessage to edit. Required unless inline_message_id is used.
parse_modeStringOptionalFormatting: HTML, Markdown, or MarkdownV2.
POST/bot<token>/editMessageCaptionMessage or TruePartial support

Edit the caption of a media message.

Editing by inline_message_id is not supported yet – returns 501. Editing by chat_id + message_id works.

POST/bot<token>/editMessageMediaMessage or TruePartial support

Replace the media of a message.

Works by chat_id + message_id (media via URL or attach:// upload; the InputMedia caption replaces the message caption). file_id reuse and inline_message_id are not supported yet.

POST/bot<token>/editMessageReplyMarkupMessage or TruePartial support

Edit only the inline keyboard of a message.

Editing by inline_message_id is not supported yet – returns 501. Editing by chat_id + message_id works.

POST/bot<token>/editMessageLiveLocationMessage or TruePartial support

Move an active live location.

Editing by inline_message_id is not supported yet – returns 501. Editing by chat_id + message_id works.

POST/bot<token>/deleteMessageTrue

Delete a message the bot sent, or any message where it is admin.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
message_idIntegerYesIdentifier of the message.
POST/bot<token>/deleteMessagesTrue

Delete multiple messages at once.

POST/bot<token>/stopMessageLiveLocationMessage or TruePartial support

Stop updating an active live location before its period expires.

Stopping by inline_message_id is not supported yet – returns 501. Stopping by chat_id + message_id works.

POST/bot<token>/setMessageReactionTrue

Set or clear the bot's reaction on a message.

POST/bot<token>/stopPollPollPartial support

Stop an active poll the bot sent.

Returns true instead of the final Poll object.

Inline & callbacks

POST/bot<token>/answerCallbackQueryTrue

Respond to an inline-button tap; optionally show an alert.

ParameterTypeRequiredDescription
callback_query_idStringYesIdentifier of the callback query to answer.
textStringOptionalNotification text, up to 200 characters.
show_alertBooleanOptionalShow a modal alert instead of a toast.
urlStringOptionalURL opened by the client.
cache_timeIntegerOptionalSeconds the result may be cached client-side.
POST/bot<token>/answerInlineQueryTruePartial support

Answer an inline query with a list of results.

Supported result types: article, photo, gif, mpeg4_gif, document. Other types return 400.

ParameterTypeRequiredDescription
inline_query_idStringYesIdentifier of the inline query to answer.
resultsArray of InlineQueryResultYesJSON array of results. Supported types: article, photo, gif, mpeg4_gif, document.
cache_timeIntegerOptionalSeconds the result may be cached, 1-300 (default 300).
is_personalBooleanOptionalCache the results per user instead of globally.
next_offsetStringOptionalOffset for the next page, up to 64 bytes.

Chats & members

Inspect and manage chats, members, invite links, and admin rights.

GET/bot<token>/getChatChat

Up-to-date information about a chat.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
GET/bot<token>/getChatAdministratorsArray of ChatMember

List a chat's administrators.

GET/bot<token>/getChatMemberChatMember

Information about one member of a chat.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
user_idIntegerYesUnique identifier of the target user.
GET/bot<token>/getChatMemberCountInteger

Number of members in a chat.

GET/bot<token>/getUserProfilePhotosUserProfilePhotos

A user's profile photos.

GET/bot<token>/getUserChatBoostsUserChatBoostsPartial support

A user's boosts in a chat.

chat_id as @username is rejected – pass the numeric id.

POST/bot<token>/setChatTitleTrue

Change the title of a group, supergroup, or channel.

POST/bot<token>/setChatDescriptionTrue

Change the description of a group, supergroup, or channel.

POST/bot<token>/setChatPhotoTrue

Set a new chat photo. The bot must be an administrator.

POST/bot<token>/deleteChatPhotoTrue

Remove the chat photo.

POST/bot<token>/pinChatMessageTrue

Pin a message in the chat.

POST/bot<token>/unpinChatMessageTrue

Unpin a pinned message. Without message_id the most recent pin is removed.

POST/bot<token>/unpinAllChatMessagesTrue

Unpin every pinned message in the chat.

POST/bot<token>/leaveChatTrue

Make the bot leave the group, supergroup, or channel.

Moderation

Ban, restrict, and promote members. The bot needs the matching administrator right in the chat.

POST/bot<token>/banChatMemberTrue

Ban a user from a group, supergroup, or channel.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
user_idIntegerYesUnique identifier of the target user.
revoke_messagesBooleanOptionalDelete every message from this user in the chat.
POST/bot<token>/unbanChatMemberTrue

Lift a ban so the user can rejoin via an invite link.

POST/bot<token>/restrictChatMemberTrue

Restrict what a supergroup member is allowed to do.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
user_idIntegerYesUnique identifier of the target user.
permissionsChatPermissionsYesJSON object listing what the member may do.
POST/bot<token>/promoteChatMemberTrue

Promote or demote a member by setting administrator rights.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
user_idIntegerYesUnique identifier of the target user.
can_manage_chatBooleanOptionalGrant the corresponding administrator right. Each right is a separate boolean parameter.
POST/bot<token>/setChatAdministratorCustomTitleTrue

Set a custom title for an administrator the bot promoted.

POST/bot<token>/setChatPermissionsTrue

Set the default permissions for all members of a supergroup.

Bot configuration

GET/bot<token>/getMeUser

Basic information about the bot. A quick way to verify your token.

POST/bot<token>/setMyCommandsTruePartial support

Set the bot's list of commands.

The chat, chat_administrators and chat_member scopes silently fall back to the default scope.

ParameterTypeRequiredDescription
commandsArray of BotCommandYesJSON array of commands, 0-100 entries.
scopeBotCommandScopeOptionalWhere the commands apply. Only the default scope is honoured today.
language_codeStringOptionalTwo-letter language code the commands apply to.
GET/bot<token>/getMyCommandsArray of BotCommand

Current list of the bot's commands.

POST/bot<token>/setMyNameTrue

Set the bot's name.

GET/bot<token>/getMyNameBotName

Current bot name.

POST/bot<token>/setMyDescriptionTrue

Set the bot's description.

POST/bot<token>/setChatMenuButtonTruePartial support

Change the bot's menu button in a chat.

The web_app button type is rejected with 400. Private chats only.

POST/bot<token>/logOutTrue

Log out from the cloud Bot API before moving the bot to your own server.

POST/bot<token>/deleteMyCommandsTruePartial support

Delete the bot's command list for the given scope and language.

The chat, chat_administrators and chat_member scopes silently fall back to the default scope.

GET/bot<token>/getMyDescriptionBotDescription

Read the bot's description shown on an empty chat screen.

POST/bot<token>/setMyShortDescriptionTrue

Set the short description shown on the bot's profile page.

GET/bot<token>/getMyShortDescriptionBotShortDescription

Read the bot's short description.

GET/bot<token>/getChatMenuButtonMenuButton

Read the bot's menu button for a chat, or the default one.

POST/bot<token>/setMyDefaultAdministratorRightsTrue

Set the administrator rights requested when the bot is added to a chat.

GET/bot<token>/getMyDefaultAdministratorRightsChatAdministratorRights

Read the bot's default administrator rights.

POST/bot<token>/setUserEmojiStatusTrue

Set a user's emoji status using a custom emoji the bot may use.

POST/bot<token>/closeTruePartial support

Close the bot instance before moving it between servers.

Accepted and answers true, but is a no-op – Reyta has no local-server model to close.

Files & stickers

GET/bot<token>/getFileFile

Prepare a file for download and return a File with its path.

ParameterTypeRequiredDescription
file_idStringYesIdentifier of the file. The response contains a file_path to download from /file/bot<token>/<file_path>.
GET/bot<token>/getStickerSetStickerSet

A sticker set by name.

GET/bot<token>/getCustomEmojiStickersArray of Sticker

Information about custom emoji stickers by id.

POST/bot<token>/createNewStickerSetTrueNot available yet

Create a new sticker set owned by a user.

Not implemented yet – returns 501. Creating sticker sets needs file upload, which is not wired up.

POST/bot<token>/deleteStickerFromSetTrue

Remove a sticker from a set.

POST/bot<token>/deleteStickerSetTrue

Delete a sticker set the bot created.

POST/bot<token>/setStickerSetTitleTrue

Rename a sticker set the bot created.

POST/bot<token>/setStickerPositionInSetTrue

Move a sticker to a different position in its set.

POST/bot<token>/setStickerEmojiListTrue

Replace the emoji associated with a sticker.

POST/bot<token>/setStickerKeywordsTrue

Replace the search keywords of a sticker.

POST/bot<token>/setStickerMaskPositionTrue

Change where a mask sticker is placed on a face.

POST/bot<token>/uploadStickerFileFileNot available yet

Upload a sticker file for later use in a sticker set.

Not implemented yet – returns 501. Depends on sticker byte upload, which is not wired up.

POST/bot<token>/addStickerToSetTrueNot available yet

Add a new sticker to a set the bot created.

Not implemented yet – returns 501. Depends on sticker byte upload, which is not wired up.

POST/bot<token>/replaceStickerInSetTrueNot available yet

Replace an existing sticker in a set.

Not implemented yet – returns 501. Depends on sticker byte upload, which is not wired up.

POST/bot<token>/setStickerSetThumbnailTrueNot available yet

Set the thumbnail of a sticker set.

Not implemented yet – returns 501. Depends on sticker byte upload, which is not wired up.

POST/bot<token>/setCustomEmojiStickerSetThumbnailTrueNot available yet

Set the thumbnail of a custom emoji sticker set.

Not implemented yet – returns 501. Depends on sticker byte upload, which is not wired up.

Forum topics

POST/bot<token>/createForumTopicForumTopic

Create a topic in a forum supergroup.

ParameterTypeRequiredDescription
chat_idInteger or StringYesUnique identifier of the target chat, or @channelusername.
nameStringYesTopic name, up to 128 characters.
icon_colorIntegerOptionalIcon colour as an RGB integer.
icon_custom_emoji_idStringOptionalCustom emoji used as the topic icon.
POST/bot<token>/editForumTopicTrue

Edit name/icon of a forum topic.

POST/bot<token>/deleteForumTopicTrue

Delete a forum topic along with its messages.

POST/bot<token>/closeForumTopicTrue

Close a forum topic so no new messages can be posted.

POST/bot<token>/reopenForumTopicTrue

Reopen a closed forum topic.

POST/bot<token>/unpinAllForumTopicMessagesTrue

Unpin every pinned message in a forum topic.

POST/bot<token>/editGeneralForumTopicTrue

Rename the General topic of a forum.

POST/bot<token>/closeGeneralForumTopicTrue

Close the General topic of a forum.

POST/bot<token>/reopenGeneralForumTopicTrue

Reopen the General topic of a forum.

POST/bot<token>/hideGeneralForumTopicTrue

Hide the General topic from the forum's topic list.

POST/bot<token>/unhideGeneralForumTopicTrue

Show the General topic again.

GET/bot<token>/getForumTopicIconStickersArray of StickerNot available yet

List the stickers available as forum topic icons.

Always returns an empty array – the icon catalogue is not wired up yet.