api.botsubscription.com
GET /v1/endpoint
Authentication Bearer
Token
Stays in this tab. Required for this endpoint — the value below is what gets sent.
Request GET Response —
cURL Node Python PHP Go Ruby
Copy curl --request GET \
--url https://api.botsubscription.com/v1/endpoint \
--header 'Authorization: Bearer sk_live_•••'— — · — · —
Response will appear here.
Create a new coupon from an existing one. Every field on the source coupon is copied over; any field you supply in the request body overrides the corresponding value on the new coupon.
POST /v2/projects/ {project_id} /coupons/ {coupon_id} /clone CopyTry it Authorization Bearer Token Required
Requires the coupons:add permission. If the source coupon is archived and the request body does not set status, the new coupon is created archived as well.
Path Parameters The unique identifier of the project.
The unique identifier of the source coupon to clone.
Request Body Name for the new coupon. Defaults to the source coupon's name.
Code for the new coupon. Defaults to the source coupon's code—if it collides with an active coupon, the codes share the same usage limit and redemption counter.
Overrides the source coupon's description.
Overrides the source coupon's percentage discount.
Overrides the source coupon's flat discount amount.
Overrides the source coupon's currency.
Overrides the source coupon's usage limit.
Overrides the source coupon's start date.
Overrides the source coupon's end date.
Overrides the source coupon's metadata.
curl -X POST "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/coupons/11111111-1111-1111-1111-111111111111/clone" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Summer Sale (Reissue)",
"code": "SUMMER2024-B"
}' const project_id = 'YOUR_PROJECT_ID' ;
const coupon_id = '11111111-1111-1111-1111-111111111111' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/coupons/${ coupon_id }/clone` , {
method: 'POST' ,
headers: {
'Authorization' : 'Bearer YOUR_TOKEN' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({
display_name: 'Summer Sale (Reissue)' ,
code: 'SUMMER2024-B'
})
});
const data = await response. json (); import requests
project_id = 'YOUR_PROJECT_ID'
coupon_id = '11111111-1111-1111-1111-111111111111'
response = requests.post(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /coupons/ { coupon_id } /clone' ,
headers = {
'Authorization' : 'Bearer YOUR_TOKEN' ,
'Content-Type' : 'application/json'
},
json = {
'display_name' : 'Summer Sale (Reissue)' ,
'code' : 'SUMMER2024-B'
}
)
data = response.json() $project_id = 'YOUR_PROJECT_ID' ;
$coupon_id = '11111111-1111-1111-1111-111111111111' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/coupons/{ $coupon_id }/clone" );
curl_setopt ($ch, CURLOPT_POST , true );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [
'Authorization: Bearer YOUR_TOKEN' ,
'Content-Type: application/json'
]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , json_encode ([
'display_name' => 'Summer Sale (Reissue)' ,
'code' => 'SUMMER2024-B'
]));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); Coupon cloned application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/coupons/11111111-1111-1111-1111-111111111111/clone" ,
"code" : 201 ,
"data" : {
"coupon_id" : "22222222-2222-2222-2222-222222222222" ,
"code" : "SUMMER2024-B" ,
"display_name" : "Summer Sale (Reissue)" ,
"description" : "Summer promotion discount" ,
"coupon_type" : "percentage" ,
"percentage" : "20" ,
"auto_apply" : false ,
"status" : "active" ,
"total_redemptions" : 0 ,
"total_reservations" : 0 ,
"invitee_mode" : "all" ,
"renewal_constraint" : "any" ,
"payment_count_comparator" : "any" ,
"lifetime_revenue_comparator" : "any" ,
"plan_scope" : "all" ,
"created_at" : 1725100800000 ,
"archived_at" : null ,
"metadata" : {}
}
} Source coupon not found application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "POST" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/coupons/11111111-1111-1111-1111-111111111111/clone" ,
"code" : 404 ,
"error" : {
"error_code" : "NOT_FOUND" ,
"message" : "Requested resource could not be found"
}
} Last updated: August 31, 2026
PreviousUnarchive Coupon Next List Payment Providers