Перейти к основному содержанию
POST
/
api
/
admins
/
promote
Promote a user to admin
curl --request POST \
  --url http://localhost:8080/api/admins/promote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "bot_id": 1,
  "chat_id": -100123456789,
  "user_id": 987654321,
  "perms": {
    "can_delete_messages": true,
    "can_pin_messages": true,
    "can_invite_users": true
  }
}
'
{
  "ok": true
}

Авторизации

Authorization
string
header
обязательно

API key with bmx_ prefix. Obtain via /api/auth/api-keys.

Тело

application/json
bot_id
integer
обязательно

Bot ID (must be admin in chat)

chat_id
integer
обязательно

Chat ID

user_id
integer
обязательно

User ID to promote

perms
object

Ответ

User promoted

ok
boolean
Пример:

true