POST
/
components
/
v1
/
offer-design
cURL
curl --request POST \
  --url https://api-sandbox.appcharge.com/components/v1/offer-design \
  --header 'Content-Type: application/json' \
  --header 'x-publisher-token: <api-key>' \
  --data '{
  "offerUiType": "SpecialOffer",
  "name": "Summer Special",
  "externalId": "summer_special_offer",
  "backgroundImageUrl": "https://example.com/images/summer-special.png",
  "title": {
    "text": "Limited Time Offer",
    "fontColor": "#FFFFFF",
    "fontSize": 16,
    "fontWeight": "bold"
  }
}'
{
  "id": "507f1f77bcf86cd799439011",
  "offerUiType": "SpecialOffer",
  "name": "Summer Special",
  "externalId": "summer_special_offer",
  "backgroundImageUrl": "https://cdn.appcharge.com/507f1f77bcf86cd799439011_background.png",
  "title": {
    "text": "Limited Time Offer",
    "fontColor": "#FFFFFF",
    "fontSize": 16,
    "fontWeight": "bold"
  },
  "externalBackgroundImageUrl": "https://example.com/images/summer-special.png"
}

Authorizations

x-publisher-token
string
header
required

Publisher token, as displayed in the Publisher Dashboard.

Body

application/json

Design a special offer.

offerUiType
enum<string>
required

Type of offer design.

Available options:
SpecialOffer
Example:

"SpecialOffer"

name
string
required

Offer design name.

Example:

"Summer Special"

externalId
string
required

Design ID that you define.

Example:

"summer_special_offer"

backgroundImageUrl
string<url>
required

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

Example:

"https://example.com/images/summer-special.png"

title
object

Offer title details.

Example:
{
"text": "Limited Time Offer",
"fontColor": "#FFFFFF",
"fontSize": 16,
"fontWeight": "bold"
}

Response

Offer design created successfully.

Response schema for a special offer design.

id
string
required

Design ID.

Example:

"507f1f77bcf86cd799439011"

offerUiType
enum<string>
required

Type of offer design.

Available options:
SpecialOffer
Example:

"SpecialOffer"

name
string
required

Offer design name.

Example:

"Summer Special"

externalId
string
required

Design ID that you defined.

Example:

"summer_special_offer"

backgroundImageUrl
string<url>
required

URL of background image stored on Appcharge CDN.

Example:

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

title
object

Offer title details.

Example:
{
"text": "Limited Time Offer",
"fontColor": "#FFFFFF",
"fontSize": 16,
"fontWeight": "bold"
}
externalBackgroundImageUrl
string<url>

Original URL of the background image if uploaded via external link.

Example:

"https://example.com/images/summer-special.png"