CreateImageAsset

Create image asset

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Identifier of the platform who requests management api. It is passed as a path parameter.

string
required

The id of the ad account that owns this image asset.

Body Params
string
required

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:
    • BANNER
    • LOGO
  • 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):

  1. Upload by file: Use the file parameter with the actual image file
  2. Upload by CDN: Include the image_url object in this image_asset object
  3. 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.
{
  "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.
{
  "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.
{
  "title": "Banner Image",
  "image_asset_type": "BANNER"
}
file

Provide the image file when using upload by file method. Do not use this parameter if image_url object is included in the image_asset object or if object_key parameter is provided.

string

Provide the object key when using upload by session method. Do not use this parameter if file parameter is provided or if image_url object is included in the image_asset object. The object key can be obtained from CreateBulkImageUploadSession API's response. User need to upload a image file after this API's response. Please make sure file is uploaded and then request with the object_key.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Choose an example:
application/json