PUT
/
components
/
v1
/
asset
/
{name}
cURL
curl --request PUT \
  --url https://api-sandbox.appcharge.com/components/v1/asset/{name} \
  --header 'Content-Type: multipart/form-data' \
  --header 'x-publisher-token: <api-key>' \
  --form type=bgMobile \
  --form name=main_menu_background \
  --form externalImageUrl=https://example.com/assets/main_menu_background_updated.png \
  --form file=@example-file
{
  "id": "507f1f77bcf86cd799439011",
  "name": "gold_coins_icon",
  "type": "product",
  "imageUrl": "https://cdn.appcharge.com/507f1f77bcf86cd799439011_product.png",
  "contentType": "image/png",
  "externalImageUrl": "https://example.com/assets/gold_coins_icon.png"
}

Authorizations

x-publisher-token
string
header
required

Publisher token, as displayed in the Publisher Dashboard.

Path Parameters

name
string
required

Asset name.

Example:

"gold_coins_icon"

Body

type
enum<string>

Asset category.

Available options:
product,
badge,
bgMobile,
bgDesk,
logo,
favicon,
bgBundle,
bgPopup,
general,
section,
productPrefix,
playerLevel,
banner,
addToHomeButtonImage,
addToHomeIconImage,
playerProfileImage,
offerHeader,
backToGameButtonImage,
animation,
trait
Example:

"bgMobile"

name
string

Asset name.

Example:

"main_menu_background"

file
file

A valid PNG or JPEG image file. Maximum size is 2 MB.

externalImageUrl
string<url>

URL to a valid, publicly accessible image. Maximum size is 2 MB. Must be in PNG or JPEG format.

Example:

"https://example.com/assets/main_menu_background_updated.png"

Response

Asset updated successfully.

id
string
required

Asset ID.

Example:

"507f1f77bcf86cd799439011"

name
string
required

Asset name.

Example:

"gold_coins_icon"

type
enum<string>
required

Asset category.

Available options:
product,
badge,
bgMobile,
bgDesk,
logo,
favicon,
bgBundle,
bgPopup,
general,
section,
productPrefix,
playerLevel,
banner,
addToHomeButtonImage,
addToHomeIconImage,
playerProfileImage,
offerHeader,
backToGameButtonImage,
animation,
trait
Example:

"product"

imageUrl
string<url>
required

URL of image stored on Appcharge CDN.

Example:

"https://cdn.appcharge.com/507f1f77bcf86cd799439011_product.png"

contentType
string
required

MIME type of image (e.g., image/png, image/jpeg).

Example:

"image/png"

externalImageUrl
string<url>

Original URL of the image if uploaded via external link.

Example:

"https://example.com/assets/gold_coins_icon.png"