Skip to main content
POST
/
api
/
v1
/
coupons
Create a coupon
curl --request POST \
  --url https://api.example.com/api/v1/coupons \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "code": "<string>",
  "discount": {
    "discount_type": "PERCENTAGE",
    "percentage": "<string>"
  },
  "description": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "plan_ids": [
    "<string>"
  ],
  "recurring_value": 123,
  "redemption_limit": 123,
  "reusable": true
}
'
{
  "code": "<string>",
  "description": "<string>",
  "disabled": true,
  "discount": {
    "percentage": "<string>"
  },
  "id": "<string>",
  "reusable": true,
  "expires_at": "2023-11-07T05:31:56Z",
  "recurring_value": 123,
  "redemption_limit": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
code
string
required
discount
object
required
description
string | null
expires_at
string<date-time> | null
plan_ids
string<MeteroidId>[]
recurring_value
integer<int32> | null
redemption_limit
integer<int32> | null
reusable
boolean

Response

Coupon created

code
string
required
description
string
required
disabled
boolean
required
discount
object
required
id
string<MeteroidId>
required
Example:

"cou_7n42DGM5Tflk9n8mt7Fhc7"

reusable
boolean
required
expires_at
string<date-time> | null
recurring_value
integer<int32> | null
redemption_limit
integer<int32> | null