Skip to main content
POST
Create promo code
This reference describes API version 2026-05-18. Send Commet-Version: 2026-05-18 with your request.

Authorizations

x-api-key
string
header
required

Headers

Commet-Version
string
default:2026-05-18

API version used by this reference. Send this header to select this contract explicitly.

Body

application/json
code
string
required
Minimum string length: 1
discountType
enum<string>
required
Available options:
percentage,
amount
discountValue
integer
required
Required range: x <= 9007199254740991
durationCycles
integer
Required range: x <= 9007199254740991
billingInterval
enum<string> | null
Available options:
weekly,
monthly,
quarterly,
semiannual,
yearly,
one_time
maxRedemptions
integer
Required range: x <= 9007199254740991
expiresAt
string<date-time>
planIds
string[]
firstPurchaseOnly
boolean

Whether the code only applies to a customer's first purchase: one with no paid invoice above zero and no paid subscription. Defaults to false.

Response

Success

success
any
required
data
object
required