Skip to content

Upload a variant's preview image

POST
/cms/pagebuilder/variants/{blockType}/{key}/thumbnail
curl --request POST \
--url https://api.example.com/cms/pagebuilder/variants/example/example/thumbnail \
--header 'API-Key: <API-Key>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Sets the preview image editors see when choosing this display. PNG, JPEG, WebP or GIF, up to 5 MB, sent as multipart/form-data field file. The variant must already be registered.

blockType
required
string
key
required
string
Media typemultipart/form-data
object
file
required
string format: binary

Thumbnail stored

Media typeapplication/json
object
blockType
string
key
string
thumbnailId
integer
thumbnail

Image URL

string

Example generated

{
"blockType": "example",
"key": "example",
"thumbnailId": 1,
"thumbnail": "example"
}

Missing or invalid image

API key not linked to a CMS user with the required permission

Variant not registered