Skip to main content
POST
/
coupons
/
coupon
/
{couponName}
/
promo-codes
curl -X POST \
  'https://api.appcharge.com/coupons/coupon/summer26/promo-codes' \
  -H 'Content-Type: application/json' \
  -H 'x-publisher-token: <x-publisher-token>' \
  -d '{
    "promoCodes": [
        {
            "name": "swx1",
            "maxRedemptions": 1,
            "active": true
        },
        {
            "name": "swx2",
            "maxRedemptions": 1,
            "active": true
        }
    ]
}'
{
    "promoCodes": [
        {
            "name": "swx1",
            "active": true,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-25T08:44:26.668Z"
        },
        {
            "name": "swx2",
            "active": true,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-25T08:44:26.668Z"
        }
    ]
}
curl -X POST \
  'https://api.appcharge.com/coupons/coupon/summer26/promo-codes' \
  -H 'Content-Type: application/json' \
  -H 'x-publisher-token: <x-publisher-token>' \
  -d '{
    "promoCodes": [
        {
            "name": "swx1",
            "maxRedemptions": 1,
            "active": true
        },
        {
            "name": "swx2",
            "maxRedemptions": 1,
            "active": true
        }
    ]
}'
{
    "promoCodes": [
        {
            "name": "swx1",
            "active": true,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-25T08:44:26.668Z"
        },
        {
            "name": "swx2",
            "active": true,
            "maxRedemptions": 1,
            "createdAt": "2025-01-22T15:58:24.116Z",
            "updatedAt": "2025-01-25T08:44:26.668Z"
        }
    ]
}

Authorizations

x-publisher-token
string
header
required

Publisher token, as displayed in the Publisher Dashboard.

Path Parameters

couponName
string
required

Coupon name.

Example:

"summer26"

Body

application/json
promoCodes
object[]
required

List of promo codes to create.

Response

Promo codes created successfully.

promoCodes
object[]

List of created promo codes.