Apply background edits and regenerate variants
Applies the client-side image-editor design state to the uploaded source and regenerates the responsive draft background variants. Requires a write-scoped key.
Authorization
bearerAuth Your al_live_<prefix>_<secret> API key. Mint and manage keys in the dashboard.
In: header
Query Parameters
Registered hostname, e.g. onlydasha.com.
Which background variant to edit.
"mobile"Value in
- "mobile"
- "desktop"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/admin/bg/edit?domain=string" \ -H "Content-Type: application/json" \ -d '{ "designState": { "adjustments": { "crop": { "x": 0, "y": 120, "width": 1080, "height": 1920 }, "rotation": 0 } } }'{ "files": { "bg-720.jpg": { "w": 720 }, "bg-1080.jpg": { "w": 1080 } }, "avif_enabled": true, "preview_token": 1719767200, "skipped": [], "variant": "mobile", "domain": "onlydasha.com"}{ "detail": { "code": "no_source", "message": "Upload a source image first" }}{ "detail": { "code": "domain_not_found", "message": "Domain 'onlydasha.com' is not registered" }}Upload a background source image
Uploads the original (un-edited) background image for a domain and variant, stored as the draft source. Requires a write-scoped key.
Set the desktop canvas color
Sets the per-domain solid backdrop color shown behind the phone-card on desktop, written to the draft state. Requires a write-scoped key.