Telegram Bot Profile and Commands
Change how the bot you connected to a profile looks and which commands it offers. These changes are seen by every user of your bot, also outside Upload-Post.
- Authentication: API Key —
Authorization: Apikey <YOUR_API_KEY> - Every request takes
user(the profile username).
Read the profile
GET /api/uploadposts/telegram/bot-profile?user=my-profile[&language_code=es]
Returns bot (getMe), name, description, short_description, menu_button,
default_administrator_rights (groups) and default_administrator_rights_channels. If one of
the reads fails, it comes back as null with partial: true and the names in unavailable.
Update the profile
PATCH /api/uploadposts/telegram/bot-profile — JSON or multipart/form-data.
| Field | Type | Description | Telegram method |
|---|---|---|---|
name | string | 0-64 characters. | setMyName |
description | string | 0-512 characters, shown in an empty chat with the bot. | setMyDescription |
short_description | string | 0-120 characters, shown on the bot's profile and when shared. | setMyShortDescription |
language_code | string | Two-letter ISO 639-1 code: the texts above apply to that language only. Empty = every language without its own text. | |
photo / photo_url | file / URL | Static profile photo (.jpg). | setMyProfilePhoto (static) |
animation / animation_url | file / URL | Animated profile photo (.mp4), with optional main_frame_timestamp (seconds). | setMyProfilePhoto (animated) |
remove_photo | boolean | Remove the profile photo. Needs confirm: true. | removeMyProfilePhoto |
menu_button | object | MenuButton: {"type": "commands"}, {"type": "default"} or {"type": "web_app", "text": "Open", "web_app": {"url": "https://…"}}. menu_chat_id sets it for one private chat only. | setChatMenuButton |
default_administrator_rights | object / null | ChatAdministratorRights suggested when someone adds the bot as admin; null clears them. for_channels: true for channels. | setMyDefaultAdministratorRights |
To remove a text for a language send "" in a JSON body, or clear_name / clear_description /
clear_short_description = true in a form (blank form fields are ignored on purpose).
curl -X PATCH https://api.upload-post.com/api/uploadposts/telegram/bot-profile \
-H 'Authorization: Apikey your-api-key-here' -H 'Content-Type: application/json' \
-d '{"user": "my-profile", "language_code": "es", "name": "Mi Bot", "short_description": "Noticias cada día"}'
{ "success": true, "updated": ["name", "short_description"], "language_code": "es", "message": "Telegram bot profile updated." }
Commands
| Method | Endpoint | Body | Telegram method |
|---|---|---|---|
GET | /api/uploadposts/telegram/bot-commands | scope, language_code | getMyCommands |
POST (or PUT) | /api/uploadposts/telegram/bot-commands | commands (1-100 {"command", "description"}; command 1-32 lowercase letters, digits or _, description 1-256), scope, language_code | setMyCommands |
DELETE | /api/uploadposts/telegram/bot-commands | scope, language_code, confirm: true | deleteMyCommands |
scope is a BotCommandScope: default,
all_private_chats, all_group_chats, all_chat_administrators, chat / chat_administrators
(with chat_id) or chat_member (with chat_id and user_id).
curl -X POST https://api.upload-post.com/api/uploadposts/telegram/bot-commands \
-H 'Authorization: Apikey your-api-key-here' -H 'Content-Type: application/json' \
-d '{"user": "my-profile", "commands": [{"command": "start", "description": "Start"}, {"command": "news", "description": "Latest posts"}]}'
Errors follow the chat management table.