Provide a JSON string representing the image_asset object.
Field Details:
title (string, required): A descriptive name of the image asset.
image_asset_type (string, required): The type of image asset. Allowed values:
image_url (object, optional): Only provide this field when neither file parameter nor object_key parameter is provided. Details about the image source:
url (string): The URL of the image.
file_name (string): The file name of the image. e.g., image.png.
Upload Methods (choose only one):
Upload by file : Use the file parameter with the actual image file
Upload by CDN : Include the image_url object in this image_asset object
Upload by session : Include the object_key parameter which is issued from CreateBulkImageUploadSession API
Examples:
Example 1: Upload by file
Provide the file parameter with the image file and omit both object_key and image_url object in the image_asset object.
JSON
{
"title": "Banner Image",
"image_asset_type": "BANNER"
}
Example 2: Upload by CDN
Omit both object_key and file parameter and include the image_url object in the image_asset object.
JSON
{
"title": "Logo Image",
"image_asset_type": "LOGO",
"image_url": {
"url": "https://example.com/logo.png",
"file_name": "logo.png"
}
}
Example 3: Upload by session
Provide the object_key parameter and omit both file and image_url object in the image_asset object.
JSON
{
"title": "Banner Image",
"image_asset_type": "BANNER"
}