Dashboard
APICreate Coupon API - Add Discount Codes | BotSubscription
api.botsubscription.com
GET/v1/endpoint
AuthenticationBearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Mock
curl --request GET \
  --url https://api.botsubscription.com/v1/endpoint \
  --header 'Authorization: Bearer sk_live_•••'

Create Coupon - Add Discount Codes to Your Subscription Bot

Generate a new discount code for your subscription bot. Configure percentage or fixed-amount discounts, set auto-apply rules, restrict usage to specific plans or user types, and control whether the coupon applies to first payments only or renewals too.

POST/v2/projects/{project_id}/coupons

Authorization

Bearer TokenRequired

Path Parameters

project_idstringrequired

The unique identifier of the project.

Request Body

codestringrequired

The coupon code users will enter.

display_namestringrequired

Display name for the coupon.

descriptionstring

A description of the coupon.

coupon_typestringrequired

Type of discount: percentage or fixed.

percentagenumber

The discount percentage (required for percentage type).

amountnumber

The fixed discount amount (required for fixed type).

currencystring

Currency for fixed discounts (e.g., USD). Required for fixed type.

auto_applyboolean

Whether to auto-apply this coupon. Default: false

invitee_modestring

Who can use: all, new_users, existing_users. Default: all

renewal_constraintstring

When applicable: any, first_payment, renewals. Default: any

plan_scopestring

Which plans: all or specific. Default: all

metadataobject

Custom metadata for the coupon.

Last updated: