Dashboard
APIUpdate Coupon API - Modify Discount Settings | 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_•••'

Update Coupon - Modify Discount Code Settings via API

Modify an existing discount coupon's settings. Change the discount amount, update targeting rules, toggle auto-apply, or archive the coupon to stop new redemptions. Only the fields you include in the request body are updated.

PATCH/v2/projects/{project_id}/coupons/{coupon_id}

Authorization

Bearer TokenRequired

Path Parameters

project_idstringrequired

The unique identifier of the project.

coupon_idstringrequired

The unique identifier of the coupon.

Request Body

display_namestring

Display name for the coupon.

descriptionstring

A description of the coupon.

percentagestring

Discount percentage as a decimal string (for percentage type coupons).

amountstring

Fixed discount amount as a decimal string (for fixed type coupons).

auto_applyboolean

Whether to auto-apply this coupon.

statusstring

Coupon status: active or archived.

invitee_modestring

Who can use: all, inviteesOnly, nonInvitees.

renewal_constraintstring

When applicable: any, renewalOnly, churnedOnly.

plan_scopestring

Which plans: all, include, exclude (plan_ids required when include or exclude).

starts_atnumber | string

Validity start: Unix milliseconds or ISO-8601 string.

ends_atnumber | string

Validity end: Unix milliseconds or ISO-8601 string.

metadataobject

Custom metadata for the coupon.

Last updated: