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.
Get all discount codes configured for your subscription bot. Filter by status (active, expired, archived), search by code, or find coupons that apply to specific plans. Each coupon includes redemption statistics and configuration details.
GET /v2/projects/ {project_id} /coupons CopyTry it Authorization Bearer Token Required
Path Parameters The unique identifier of the project.
Query Parameters Number of items per page. Default: 50
Number of items to skip. Default: 0
Filter by status: active, expired, archived
Filter by auto-apply setting
Filter by applicable plan ID
Sort field (e.g., created_at, code)
curl -X GET "https://api.botsubscription.com/v2/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/coupons?limit=10&status=active" \
-H "Authorization: Bearer YOUR_TOKEN" const project_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/coupons?limit=10&status=active` , {
method: 'GET' ,
headers: {
'Authorization' : 'Bearer YOUR_TOKEN'
}
});
const data = await response. json (); import requests
project_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479'
response = requests.get(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /coupons' ,
params = { 'limit' : 10 , 'status' : 'active' },
headers = { 'Authorization' : 'Bearer YOUR_TOKEN' }
)
data = response.json() $project_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/coupons?limit=10&status=active" );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ 'Authorization: Bearer YOUR_TOKEN' ]);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); Success application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "GET" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/coupons" ,
"code" : 200 ,
"total" : 2 ,
"data" : [
{
"coupon_id" : "11111111-1111-1111-1111-111111111111" ,
"code" : "SUMMER2024" ,
"display_name" : "Summer Sale" ,
"description" : "Summer promotion discount" ,
"coupon_type" : "percentage" ,
"percentage" : "20" ,
"auto_apply" : false ,
"status" : "active" ,
"total_redemptions" : 45 ,
"total_reservations" : 0 ,
"invitee_mode" : "all" ,
"renewal_constraint" : "any" ,
"payment_count_comparator" : "any" ,
"lifetime_revenue_comparator" : "any" ,
"plan_scope" : "all" ,
"created_at" : "2024-05-15T10:00:00.000Z" ,
"metadata" : {}
},
{
"coupon_id" : "22222222-2222-2222-2222-222222222222" ,
"code" : "WELCOME10" ,
"display_name" : "Welcome Discount" ,
"description" : "Welcome discount for new users" ,
"coupon_type" : "fixed" ,
"amount" : "10" ,
"currency" : "USD" ,
"auto_apply" : true ,
"status" : "active" ,
"total_redemptions" : 230 ,
"total_reservations" : 0 ,
"invitee_mode" : "all" ,
"renewal_constraint" : "any" ,
"payment_count_comparator" : "any" ,
"lifetime_revenue_comparator" : "any" ,
"plan_scope" : "all" ,
"created_at" : "2024-01-01T00:00:00.000Z" ,
"metadata" : {}
}
]
} Last updated: May 28, 2026
PreviousDelete Admin Next Get Coupon