Skip to main content
POST
/
v1
/
promo-codes
Create a promo code
curl --request POST \
  --url https://api.useduro.com/v1/promo-codes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "LAUNCH50",
  "discountValue": 123,
  "planId": "<string>",
  "duration": "once",
  "durationCycles": 123,
  "maxRedemptions": 123,
  "expiresAt": "2023-11-07T05:31:56Z"
}
'
{
  "id": "<string>",
  "code": "<string>",
  "discountType": "<string>",
  "discountValue": 123,
  "duration": "<string>",
  "redeemedCount": 123,
  "remaining": 123,
  "active": true,
  "expiresAt": "<string>",
  "createdAt": "<string>"
}

Authorizations

Authorization
string
header
required

A secret key (sk_test_… / sk_live_…), OAuth token, or identity token.

Body

application/json
code
string
required
Example:

"LAUNCH50"

discountType
enum<string>
required
Available options:
percentage,
fixed
discountValue
integer
required

Percent (≤100) or minor units.

planId
string
duration
enum<string>
default:once
Available options:
once,
forever,
repeating
durationCycles
integer
maxRedemptions
integer
expiresAt
string<date-time>

Response

201 - application/json

Created

id
string
code
string
discountType
string
discountValue
integer
duration
string
redeemedCount
integer
remaining
integer | null
active
boolean
expiresAt
string | null
createdAt
string