TEASEDocs
API ReferencePages & Publish

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

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

In: header

Query Parameters

domain*string

Registered hostname, e.g. onlydasha.com.

variant?string

Which background variant to edit.

Default"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

POST
/api/admin/bg/edit
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"  }}