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.
Archive a coupon to take it out of circulation while keeping its redemption history and configuration intact. An archived coupon can no longer be applied to new purchases; use Unarchive Coupon to bring it back.
PATCH /v2/projects/ {project_id} /coupons/ {coupon_id} /archive CopyTry it Authorization Bearer Token Required
Requires the coupons:update permission.
Path Parameters The unique identifier of the project.
The unique identifier of the coupon to archive.
curl -X PATCH "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/coupons/11111111-1111-1111-1111-111111111111/archive" \
-H "Authorization: Bearer YOUR_TOKEN" 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 }/archive` , {
method: 'PATCH' ,
headers: {
'Authorization' : 'Bearer YOUR_TOKEN'
}
}); import requests
project_id = 'YOUR_PROJECT_ID'
coupon_id = '11111111-1111-1111-1111-111111111111'
response = requests.patch(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /coupons/ { coupon_id } /archive' ,
headers = { 'Authorization' : 'Bearer YOUR_TOKEN' }
) $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 }/archive" );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , 'PATCH' );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ 'Authorization: Bearer YOUR_TOKEN' ]);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); Coupon archived application/json
No response body.
Coupon not found application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "PATCH" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/coupons/11111111-1111-1111-1111-111111111111/archive" ,
"code" : 404 ,
"error" : {
"error_code" : "NOT_FOUND" ,
"message" : "Requested resource could not be found"
}
} Last updated: August 31, 2026
PreviousValidate Coupon Next Unarchive Coupon