Skip to main content
POST
/
components
/
v1
/
badge
cURL
curl --request POST \
  --url https://api-sandbox.appcharge.com/components/v1/badge \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <api-key>' \
  --data '
{
  "name": "New Year Celebration",
  "publisherBadgeId": "new_year_celebration",
  "type": "emblem",
  "badgeImageUrl": "https://media.appcharge.com/media/69133d595af23405d8e843a5"
}
'
{
  "id": "507f1f77bcf86cd799439011",
  "name": "New Year Celebration",
  "publisherBadgeId": "new_year_celebration",
  "type": "emblem",
  "badgeImageUrl": "https://media.appcharge.com/media/69133d595af23405d8e843a5"
}

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.

Body

application/json

Create an emblem badge.

name
string
required

Badge name.

Example:

"New Year Celebration"

publisherBadgeId
string
required

Badge ID that you define.

Example:

"new_year_celebration"

type
enum<string>
required

Badge type.

Available options:
emblem
Example:

"emblem"

badgeImageUrl
string<url>
required

Badge image URL in PNG or JPEG format.

For uploaded files, this is the Appcharge-hosted CDN URL. For external image URLs, this is the original image URL served from the provided URL. External image URLs are saved and used as-is, and Appcharge doesn't download, copy, upload, or host them. Images must remain available at the provided URLs.

We recommend uploading image files instead of using external URLs when possible.

Example:

"https://media.appcharge.com/media/69133d595af23405d8e843a5"

Response

Badge created successfully.

Response schema for an emblem badge.

id
string

Badge ID.

Example:

"507f1f77bcf86cd799439011"

name
string

Badge name.

Example:

"New Year Celebration"

publisherBadgeId
string

Badge ID that you defined.

Example:

"new_year_celebration"

type
enum<string>

Badge type.

Available options:
emblem
Example:

"emblem"

badgeImageUrl
string<url>

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

Example:

"https://media.appcharge.com/media/69133d595af23405d8e843a5"