Update Subscription Discount
Update an existing subscription discount (gift link). Same body and validation as Create Subscription Discount.
Authorization
default Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Path Parameters
The Fansly Account ID
The Fansly subscription discount (gift code) ID.
Request Body
application/json
The subscription plan ID this discount renews for.
Discounted price in cents (e.g. 5000 = $5.00).
Duration in days until the subscriber rebills at the full subscription price.
Optional internal label for the discount.
Maximum number of times the discount can be claimed. Default = 100.
Set to 1 to exclude users who have already claimed a discount for this plan, 0 to allow everyone. Default = 1.
Optional start time as a UTC epoch in milliseconds. 0 (default) means active immediately.
Optional end time as a UTC epoch in milliseconds. 0 (default) means no expiry.
Response Body
application/json
curl -X PUT "https://app.onlyfansapi.com/api/fansly/fansly_acct_XXXXXXXXXXXXXXX/subscription-discounts/927958667997761536" \ -H "Content-Type: application/json" \ -d '{ "plan_id": "843584256495083520", "price": 5000, "duration": 7 }'{
"data": {
"id": "900000000000000003",
"type": 1,
"label": "new link",
"planId": "700000000000000010",
"accountId": "800000000000000001",
"price": 5000,
"paymentMethodRequired": 0,
"duration": 7,
"maxUses": 100,
"newSubscribersOnly": 1,
"startsAt": 0,
"endsAt": 0
},
"_meta": {
"_credits": {
"used": 1,
"balance": 10055788,
"note": "Always"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 5000,
"limit_day": null,
"remaining_minute": 4999,
"remaining_day": null,
"notice": "We have decided to remove our daily rate limits. Please remove any references to these in your integrations."
}
}
}