Create promo code
Create a new promo code. Optionally restrict to specific plans.
Create a new promo code. Optionally restrict to specific plans.
ApiKeyAuth In: header
application/json
TypeScript Definitions
Use the request body type in TypeScript.
1 <= length"percentage" | "amount"0 < value0 < value0 < valuedate-timeapplication/json
curl -X POST "https://commet.co/api/v1/promo-codes" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "discountType": "percentage", "discountValue": 0 }'application/json
application/json
application/json
Promo code string
Discount amount (percentage 1-100 or amount in rate scale)
Number of billing cycles the discount applies
Maximum number of times the code can be redeemed
Expiration date (ISO 8601)
Restrict to specific plan IDs
Create a new promo code. Optionally restrict to specific plans.
{
"success": true,
"data": {
"object": "promo_code",
"livemode": true,
"id": "string",
"code": "string",
"discountType": "percentage",
"discountValue": 0,
"durationCycles": 0,
"maxRedemptions"
{
"success": false,
"error": {
"type": "validation_error",
"code": "string",
"message": "string",
"doc_url": "string",
"param": "string"
}
}{
"success": false,
"error": {
"type": "validation_error",
"code": "string",
"message": "string",
"doc_url": "string",
"param": "string"
}
}{
"success": false,
"error": {
"type": "validation_error",
"code": "string",
"message": "string",
"doc_url": "string",
"param": "string"
}
}