Skip to main content
PATCH
/
menu-layout
/
buttons
/
{button_id}
Update Button
curl --request PATCH \
  --url http://localhost:8080/menu-layout/buttons/{button_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": {},
  "icon": "<string>",
  "enabled": true,
  "visibility": "all",
  "conditions": {
    "has_active_subscription": true,
    "subscription_is_active": true,
    "has_traffic_limit": true,
    "is_admin": true,
    "is_moderator": true,
    "referral_enabled": true,
    "contests_visible": true,
    "support_enabled": true,
    "language_selection_enabled": true,
    "happ_enabled": true,
    "simple_subscription_enabled": true,
    "show_trial": true,
    "show_buy": true,
    "has_saved_cart": true,
    "min_balance_kopeks": 1,
    "max_balance_kopeks": 1,
    "min_registration_days": 1,
    "max_registration_days": 1,
    "min_referrals": 1,
    "has_referrals": true,
    "promo_group_ids": [
      "<string>"
    ],
    "exclude_promo_group_ids": [
      "<string>"
    ],
    "has_subscription_days_left": 1,
    "max_subscription_days_left": 1,
    "is_trial_user": true,
    "has_autopay": true
  },
  "action": "<string>",
  "dynamic_text": true,
  "open_mode": "callback",
  "webapp_url": "<string>",
  "description": "<string>",
  "sort_order": 123
}
'
{
  "type": "builtin",
  "text": {},
  "action": "<string>",
  "builtin_id": "<string>",
  "icon": "<string>",
  "enabled": true,
  "visibility": "all",
  "conditions": {
    "has_active_subscription": true,
    "subscription_is_active": true,
    "has_traffic_limit": true,
    "is_admin": true,
    "is_moderator": true,
    "referral_enabled": true,
    "contests_visible": true,
    "support_enabled": true,
    "language_selection_enabled": true,
    "happ_enabled": true,
    "simple_subscription_enabled": true,
    "show_trial": true,
    "show_buy": true,
    "has_saved_cart": true,
    "min_balance_kopeks": 1,
    "max_balance_kopeks": 1,
    "min_registration_days": 1,
    "max_registration_days": 1,
    "min_referrals": 1,
    "has_referrals": true,
    "promo_group_ids": [
      "<string>"
    ],
    "exclude_promo_group_ids": [
      "<string>"
    ],
    "has_subscription_days_left": 1,
    "max_subscription_days_left": 1,
    "is_trial_user": true,
    "has_autopay": true
  },
  "dynamic_text": false,
  "open_mode": "callback",
  "webapp_url": "<string>",
  "description": "<string>",
  "sort_order": 123
}

Path Parameters

button_id
string
required

Body

application/json

Запрос на обновление отдельной кнопки.

text
Text · object

Новые локализованные тексты

icon
string | null

Эмодзи/иконка кнопки

Maximum string length: 10
enabled
boolean | null

Включить/выключить

visibility
enum<string> | null

Новая видимость

Available options:
all,
admins,
moderators,
subscribers
conditions
ButtonConditions · object

Новые условия показа

action
string | null

Новый action (callback_data или URL)

dynamic_text
boolean | null

Текст содержит плейсхолдеры

open_mode
enum<string> | null

Режим открытия: callback или direct

Available options:
callback,
direct
webapp_url
string | null

URL для Mini App при open_mode=direct

description
string | null

Описание кнопки

Maximum string length: 200
sort_order
integer | null

Порядок сортировки

Response

Successful Response

Конфигурация отдельной кнопки.

type
enum<string>
required

Тип кнопки

Available options:
builtin,
url,
mini_app,
callback
text
Text · object
required

Локализованные тексты кнопки: {lang_code: text}

action
string
required

callback_data или URL в зависимости от типа

builtin_id
string | null

ID встроенной кнопки (для type=builtin)

icon
string | null

Эмодзи/иконка кнопки (отдельно от текста)

Maximum string length: 10
enabled
boolean
default:true

Кнопка активна

visibility
enum<string>
default:all

Видимость кнопки

Available options:
all,
admins,
moderators,
subscribers
conditions
ButtonConditions · object

Дополнительные условия показа

dynamic_text
boolean
default:false

Текст содержит плейсхолдеры ({balance}, {username} и т.д.)

open_mode
enum<string>
default:callback

Режим открытия: callback (через бота) или direct (сразу Mini App)

Available options:
callback,
direct
webapp_url
string | null

URL для Mini App при open_mode=direct

description
string | null

Описание кнопки для админ-панели

Maximum string length: 200
sort_order
integer | null

Порядок сортировки (для отображения в админке)