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 API Key Required
API key access: Unrestricted project API key required. Restricted keys cannot call this endpoint.
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_API_KEY" 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_API_KEY'
}
}); 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_API_KEY' }
) $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_API_KEY' ]);
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/11111111-1111-4111-8111-111111111111/coupons/11111111-1111-1111-1111-111111111111/archive" ,
"code" : 404 ,
"error" : {
"error_code" : "NOT_FOUND" ,
"message" : "Requested resource could not be found"
}
} Invalid or expired API key application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "PATCH" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/coupons/cccccccc-cccc-4ccc-8ccc-cccccccccccc/archive" ,
"code" : 401 ,
"error" : {
"message" : "Invalid or expired authentication token." ,
"error_code" : "UNAUTHORIZED"
}
} Last updated: November 4, 2026
PreviousValidate Coupon Next Unarchive Coupon