API reference
Coupons
A coupon takes money off a price once or on every payment, or adds free days of trial. Members type its code at checkout. A Sublaunch keeps 200 coupons at most.
Coupons wait in the Sublaunch's draft, as in the app, and members can use them once you publish the draft.
The coupon object
A code members type at checkout for money off, or for free days of trial.
Attributes
- idstringUnique identifier for the coupon.
- objectstringAlways
coupon. - codestringWhat members type.
- typestring
percentoramountoff, orfree_daysof trial.percentamountfree_days - valuenumberThe percent, the amount in the Sublaunch's currency, or the days.
- durationstring or null
oncefor the first payment,foreverfor every payment.nullforfree_days.onceforever - statusstringWhether members can use it.
activeinactive - usageintegerHow many times it was used.
- usage_limitinteger or nullHow many times it can be used,
nullfor no limit. - excluded_price_idsarray of stringsThe prices it does not apply to.
- checkout_onlybooleanWhether it is used at checkout only.
- includes_postsbooleanWhether it also takes money off paid posts.
- created_atstringWhen the coupon was created, ISO 8601.
{
"id": "Cp4mX9kQ2T",
"object": "coupon",
"code": "WELCOME20",
"type": "percent",
"value": 20,
"duration": "once",
"status": "active",
"usage": 37,
"usage_limit": 100,
"excluded_price_ids": [],
"checkout_only": true,
"includes_posts": false,
"created_at": "2026-03-12T10:04:22.000Z"
}List coupons
Returns the Sublaunch's coupons as drafted, with their uses.
Returns
A list of coupon objects, whole in one page.
curl https://api.sublaunch.com/v1/coupons \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY"{
"object": "list",
"data": [
{
"id": "Cp4mX9kQ2T",
"object": "coupon",
"code": "WELCOME20",
"type": "percent",
"value": 20,
"duration": "once",
"status": "active",
"usage": 37,
"usage_limit": 100,
"excluded_price_ids": [],
"checkout_only": true,
"includes_posts": false,
"created_at": "2026-03-12T10:04:22.000Z"
}
],
"has_more": false,
"next_cursor": null
}Create a coupon
Creates a coupon in the draft. Members can use it once the draft is published.
Body parameters
- codestringRequiredWhat members type, 40 characters at most, letters, digits,
-and_. - typestringRequired
percentoramountoff in the Sublaunch's currency, orfree_daysof trial.percentamountfree_days - valuenumberRequiredThe percent, the amount or the days.
- durationstring
oncefor the first payment,foreverfor every payment. Not forfree_days.onceforever - usage_limitintegerHow many times it can be used.
0for no limit. - excluded_price_idsarray of stringsThe prices it does not apply to, by ID.
- checkout_onlybooleanWhether it is used at checkout only.
trueby default. - includes_postsbooleanWhether it also takes money off paid posts.
falseby default. - statusstringWhether members can use it.
activeinactive
Returns
The new coupon object.
Errors
- A required parameter is missing.
paramnames it. - A parameter has a value the API does not accept.
paramnames it. - The body has a field this endpoint does not take.
- 409code_takenA coupon of the Sublaunch has this code already.
- The Sublaunch has 200 coupons already.
curl -X POST https://api.sublaunch.com/v1/coupons \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"code": "WELCOME20",
"type": "percent",
"value": 20,
"duration": "once",
"usage_limit": 100
}'{
"id": "Cp4mX9kQ2T",
"object": "coupon",
"code": "WELCOME20",
"type": "percent",
"value": 20,
"duration": "once",
"status": "active",
"usage": 0,
"usage_limit": 100,
"excluded_price_ids": [],
"checkout_only": true,
"includes_posts": false,
"created_at": "2026-11-17T09:30:00.000Z"
}Update a coupon
Changes a coupon in the draft. Its code and type stay, make a new coupon for other ones.
Path parameters
- coupon_idstringRequiredThe coupon's ID, as List coupons returns it.
Body parameters
- valuenumberThe percent, the amount or the days.
- durationstring
oncefor the first payment,foreverfor every payment. Not forfree_days.onceforever - usage_limitintegerHow many times it can be used.
0for no limit. - excluded_price_idsarray of stringsThe prices it does not apply to, by ID.
- checkout_onlybooleanWhether it is used at checkout only.
trueby default. - includes_postsbooleanWhether it also takes money off paid posts.
falseby default. - statusstringWhether members can use it.
activeinactive
Returns
The updated coupon object.
Errors
- No coupon with this ID in the key's Sublaunch.
- A parameter has a value the API does not accept.
paramnames it. - The body has a field this endpoint does not take.
curl -X PATCH \
https://api.sublaunch.com/v1/coupons/Cp4mX9kQ2T \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "inactive"
}'{
"id": "Cp4mX9kQ2T",
"object": "coupon",
"code": "WELCOME20",
"type": "percent",
"value": 20,
"duration": "once",
"status": "inactive",
"usage": 37,
"usage_limit": 100,
"excluded_price_ids": [],
"checkout_only": true,
"includes_posts": false,
"created_at": "2026-03-12T10:04:22.000Z"
}Delete a coupon
Deletes a coupon in the draft. Once the draft is published no one can use it, members who used it keep their discount.
Path parameters
- coupon_idstringRequiredThe coupon's ID, as List coupons returns it.
Returns
An object with the coupon's id and deleted set to true.
Errors
- No coupon with this ID in the key's Sublaunch.
curl -X DELETE \
https://api.sublaunch.com/v1/coupons/Cp4mX9kQ2T \
-H "Authorization: Bearer $SUBLAUNCH_API_KEY"{
"id": "Cp4mX9kQ2T",
"object": "coupon",
"deleted": true
}