Skip to main content
PUT
/
api
/
v1
/
subscriptions
/
coupons
/
{uuid}
Update a coupon
curl --request PUT \
  --url http://localhost:7701/api/v1/subscriptions/coupons/{uuid} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "Updated Summer Sale",
  "description": "Updated description.",
  "max_redemptions": 200,
  "max_cycles": 6,
  "valid_until": "2026-12-31",
  "is_active": false
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "code": "SUMMER20",
    "name": "20% off Summer Sale",
    "description": "<string>",
    "discount_type": "percentage",
    "discount_value": 20,
    "max_redemptions": 100,
    "redemptions_count": 5,
    "max_cycles": 3,
    "valid_from": "2023-11-07T05:31:56Z",
    "valid_until": "2023-11-07T05:31:56Z",
    "is_active": true,
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

X-API-Key
string
header
required

Company API key. Send in the X-API-Key header.

Path Parameters

uuid
string<uuid>
required

Body

application/json
name
string | null
Example:

"Updated Summer Sale"

description
string | null
Example:

"Updated description."

max_redemptions
integer | null

New redemption cap. Null removes the limit.

Example:

200

max_cycles
integer | null

New per-subscription cycle cap. Null removes the limit.

Example:

6

valid_until
string<date> | null

New expiry date. Null removes the expiry.

Example:

"2026-12-31"

is_active
boolean | null

Set to false to deactivate and prevent new applications.

Example:

false

Response

Coupon updated

data
object