Skip to main content
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 file='@example-file' \
  --form externalImageUrl=https://example.com/assets/main_menu_background_updated.png
{
  "id": "507f1f77bcf86cd799439011",
  "name": "gold_coins_icon",
  "type": "product",
  "imageUrl": "https://media.appcharge.com/media/691d8c9f127412f152236889baf5",
  "contentType": "image/png",
  "externalImageUrl": "https://example.com/assets/gold_coins_icon.png"
}

Documentation Index

Fetch the complete documentation index at: https://docs.appcharge.com/llms.txt

Use this file to discover all available pages before exploring further.

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. Appcharge saves and uses this URL as-is and doesn't download, copy, upload, or host the image on Appcharge CDN. The image must remain available at the provided URL.

We recommend uploading image files instead of using external URLs when possible. Appcharge hosts uploaded files on its CDN. 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

Asset ID.

Example:

"507f1f77bcf86cd799439011"

name
string

Asset name.

Example:

"gold_coins_icon"

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:

"product"

imageUrl
string<url>

Image URL. For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from your CDN at the provided URL.

Example:

"https://media.appcharge.com/media/691d8c9f127412f152236889baf5"

contentType
string

Image MIME type.

Example:

"image/png"

externalImageUrl
string<url>

Original image URL if the asset uses an external image URL. This URL is served from your CDN at the provided URL.

Example:

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