Coupons
Deactivate a coupon
curl -X POST https://api.subscriby.net/v1/projects/7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13/coupons/4b9d3e08-a1f6-4275-9c83-7e01d6a2f594/deactivate \
-H "Authorization: Bearer sbt_..." \
-H "Idempotency-Key: $(uuidgen)"
The safe way to retire a code: new redemptions stop immediately and every redemption already recorded is kept. A checkout already in flight with the code still completes, so expect a late coupon.redeemed shortly after. Emits coupon.deactivated. Answers 200 with the coupon.
post/v1/projects/{project}/coupons/{coupon}/deactivate
Request
- Base URL: https://api.subscriby.net
- URL: https://api.subscriby.net/v1/projects/{project}/coupons/{coupon}/deactivate
- Auth: HTTP bearer
Path parameters
projectstring uuid required
The project, resolved by the route binder.
couponstring uuid required
The coupon, resolved within the project by the route binder.
Headers
Idempotency-Keystring uuid required
A key unique to this operation, such as a fresh UUID. The same key replays the original 2xx response for 24 hours (with Idempotent-Replay: true), so a retry after a timeout never repeats the write; the same key with a different body is refused with 409.
Response
The coupon after the change.
Example response
{
"data": {
"id": "4b9d3e08-a1f6-4275-9c83-7e01d6a2f594",
"project_id": "7f3d1c92-8b45-4e6a-9d21-5c8e0a4b6f13",
"code": "BLACKFRIDAY",
"name": "Black Friday 2026",
"discount": {
"type": "percentage",
"value": "25.0000"
},
"duration": "once",
"limits": {
"max_redemptions": 500,
"max_redemptions_per_user": 1
},
"redemptions": {
"count": 137,
"remaining": 363
},
"window": {
"starts_at": "2026-11-27T00:00:00+00:00",
"expires_at": "2026-12-01T00:00:00+00:00"
},
"active": true,
"redeemable": true,
"created_at": "2026-11-20T09:14:02+00:00",
"updated_at": "2026-11-24T16:41:11+00:00"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.