v1

latestOpenAPI 3.1.02026-07-2665153355.3 KB
Assets

Updates an asset in the Assets Library.

put/components/v1/asset/{name}

Request body

type'product' | 'badge' | 'bgMobile' | 'bgDesk' | 'logo' | 'favicon' | 'bgBundle' | 'bgPopup' | 'general' | 'section' | 'productPrefix' | 'playerLevel' | 'banner' | 'addToHomeButtonImage' | 'addToHomeIconImage' | 'playerProfileImage' | 'offerHeader' | 'backToGameButtonImage' | 'animation' | 'trait'

Asset category.

namestring

Asset name.

filestring binary

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

externalImageUrlstring 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 request

{
  "type": "bgMobile",
  "name": "main_menu_background",
  "file": "gold_coins_icon.png",
  "externalImageUrl": "https://example.com/assets/main_menu_background_updated.png"
}

Response

Asset updated successfully.

idstring

Asset ID.

namestring

Asset name.

type'product' | 'badge' | 'bgMobile' | 'bgDesk' | 'logo' | 'favicon' | 'bgBundle' | 'bgPopup' | 'general' | 'section' | 'productPrefix' | 'playerLevel' | 'banner' | 'addToHomeButtonImage' | 'addToHomeIconImage' | 'playerProfileImage' | 'offerHeader' | 'backToGameButtonImage' | 'animation' | 'trait'

Asset category.

imageUrlstring 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.

contentTypestring

Image MIME type.

externalImageUrlstring url

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

Example response

{
  "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"
}