Terminate a member's subscription and immediately revoke their access to your paid Telegram channel or Discord role. Use this when issuing refunds, handling disputes, or removing access for policy violations. The member's payment history is preserved for your records.
DELETE /v2/projects/{project_id}/memberships/{membership_id}Try it Path Parameters The unique identifier of the project.
The unique identifier of the membership to delete.
curl -X DELETE "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/memberships/YOUR_MEMBERSHIP_ID" \
-H "Authorization: Bearer YOUR_TOKEN" const project_id = 'YOUR_PROJECT_ID' ;
const membership_id = 'YOUR_MEMBERSHIP_ID' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/memberships/${ membership_id }` , {
method: 'DELETE' ,
headers: {
'Authorization' : 'Bearer YOUR_TOKEN'
}
});
// Returns 204 No Content on success import requests
project_id = 'YOUR_PROJECT_ID'
membership_id = 'YOUR_MEMBERSHIP_ID'
response = requests.delete(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /memberships/ { membership_id } ' ,
headers = { 'Authorization' : 'Bearer YOUR_TOKEN' }
)
# Returns 204 No Content on success $project_id = 'YOUR_PROJECT_ID' ;
$membership_id = 'YOUR_MEMBERSHIP_ID' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/memberships/{ $membership_id }" );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , ' DELETE ' );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ 'Authorization: Bearer YOUR_TOKEN' ]);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch);
// Returns 204 No Content on success Membership deleted application/json
No content is returned on successful deletion.
Membership not found application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "DELETE" ,
"path" : "/v2/projects/YOUR_PROJECT_ID/memberships/YOUR_MEMBERSHIP_ID" ,
"code" : 404 ,
"error" : {
"error_code" : "NOT_FOUND" ,
"message" : "Membership not found"
}
} Last updated: January 25, 2026
PreviousList Memberships Next Extend Memberships