Skip to main content
POST
Create coupon

Authorizations

Authorization
string
header
required

API token from the Zenedu dashboard

Path Parameters

bot
integer
required

Bot ID

Body

application/json
code
string
required

Coupon code

Maximum string length: 250
discount_type
enum<string>
required
Available options:
percent,
amount
discount_amount
number
required

Percent for percent type, amount in offer currency for amount type

Required range: x >= 0.01
duration_type
enum<string>
required

How long the discount applies to a subscription

Available options:
once,
forever,
repeating
offer_ids
integer[]
required

Offers the coupon applies to

Minimum array length: 1
active
boolean

Whether the coupon is active

duration_amount
integer | null

Number of billing periods; required when duration_type is repeating

Required range: x >= 1
expired_at
string<date-time> | null

Expiration date (UTC)

usage_limit
integer | null

Maximum number of uses

Required range: x >= 1

Response

Coupon created

data
object