Upload a teaser-popup photo
Uploads the photo for one button's teaser popup. The image (max 5 MB) is cover-cropped to a 480×360 WebP card and stored under the domain's assets; the response returns the stored filename to reference as `popup.photo` when you PATCH the button. Re-uploading identical bytes is idempotent. Requires a write-scoped key.
Authorization
bearerAuth Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.
In: header
Path Parameters
The domain hostname.
The segment id.
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/admin/buttons/string/string/string/popup-photo" \ -F file="string"{ "filename": "popup_9f2c1a7b3d4e.webp", "url": "/notification/onlydasha.com/popup_9f2c1a7b3d4e.webp"}{ "detail": { "code": "popup_photo_invalid", "message": "размер картинки больше 5 MB" }}{ "detail": "auth required"}{ "detail": { "code": "button_not_found", "message": "Кнопка не найдена" }}Delete a button
Delete a draft button and re-pack the remaining buttons' positions in the segment. Requires a write-scoped key.
Reorder buttons in a segment
Set the display order of the buttons within one segment. The id list must exactly match the segment's current button set. Requires a write-scoped key.