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

  • idstring
    Unique identifier for the coupon.
  • objectstring
    Always coupon.
  • codestring
    What members type.
  • typestring
    percent or amount off, or free_days of trial.
    percentamountfree_days
  • valuenumber
    The percent, the amount in the Sublaunch's currency, or the days.
  • durationstring or null
    once for the first payment, forever for every payment. null for free_days.
    onceforever
  • statusstring
    Whether members can use it.
    activeinactive
  • usageinteger
    How many times it was used.
  • usage_limitinteger or null
    How many times it can be used, null for no limit.
  • excluded_price_idsarray of strings
    The prices it does not apply to.
  • checkout_onlyboolean
    Whether it is used at checkout only.
  • includes_postsboolean
    Whether it also takes money off paid posts.
  • created_atstring
    When the coupon was created, ISO 8601.
Coupon object
{
  "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

GET/v1/couponsread scopeMCPlist_coupons

Returns the Sublaunch's coupons as drafted, with their uses.

Returns

A list of coupon objects, whole in one page.

GET/v1/coupons
curl https://api.sublaunch.com/v1/coupons \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "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

POST/v1/couponswrite scopeMCPcreate_coupon

Creates a coupon in the draft. Members can use it once the draft is published.

Body parameters

  • codestringRequired
    What members type, 40 characters at most, letters, digits, - and _.
  • typestringRequired
    percent or amount off in the Sublaunch's currency, or free_days of trial.
    percentamountfree_days
  • valuenumberRequired
    The percent, the amount or the days.
  • durationstring
    once for the first payment, forever for every payment. Not for free_days.
    onceforever
  • usage_limitinteger
    How many times it can be used. 0 for no limit.
  • excluded_price_idsarray of strings
    The prices it does not apply to, by ID.
  • checkout_onlyboolean
    Whether it is used at checkout only. true by default.
  • includes_postsboolean
    Whether it also takes money off paid posts. false by default.
  • statusstring
    Whether members can use it.
    activeinactive

Returns

The new coupon object.

Errors

POST/v1/coupons
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
  }'
Response201
{
  "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

PATCH/v1/coupons/:coupon_idwrite scopeMCPupdate_coupon

Changes a coupon in the draft. Its code and type stay, make a new coupon for other ones.

Path parameters

  • coupon_idstringRequired
    The coupon's ID, as List coupons returns it.

Body parameters

  • valuenumber
    The percent, the amount or the days.
  • durationstring
    once for the first payment, forever for every payment. Not for free_days.
    onceforever
  • usage_limitinteger
    How many times it can be used. 0 for no limit.
  • excluded_price_idsarray of strings
    The prices it does not apply to, by ID.
  • checkout_onlyboolean
    Whether it is used at checkout only. true by default.
  • includes_postsboolean
    Whether it also takes money off paid posts. false by default.
  • statusstring
    Whether members can use it.
    activeinactive

Returns

The updated coupon object.

Errors

PATCH/v1/coupons/:coupon_id
curl -X PATCH \
  https://api.sublaunch.com/v1/coupons/Cp4mX9kQ2T \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "inactive"
  }'
Response200
{
  "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

DELETE/v1/coupons/:coupon_idwrite scopeMCPdelete_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_idstringRequired
    The coupon's ID, as List coupons returns it.

Returns

An object with the coupon's id and deleted set to true.

Errors

DELETE/v1/coupons/:coupon_id
curl -X DELETE \
  https://api.sublaunch.com/v1/coupons/Cp4mX9kQ2T \
  -H "Authorization: Bearer $SUBLAUNCH_API_KEY"
Response200
{
  "id": "Cp4mX9kQ2T",
  "object": "coupon",
  "deleted": true
}