TEASEDocs
API ReferenceLandings

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
AuthorizationBearer <token>

Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.

In: header

Path Parameters

domain*string

The domain hostname.

tier*string

The segment id.

button_id*string

The button 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

POST
/api/admin/buttons/{domain}/{tier}/{button_id}/popup-photo
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": "Кнопка не найдена"  }}