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.
Block a member from accessing your paid community on Telegram or Discord. Banned users cannot subscribe to new plans. Banning can terminate existing memberships and remove access; unbanning does not restore terminated memberships. You can optionally include a reason for internal record-keeping.
PUT /v2/projects/ {project_id} /ban/ {user_id} 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 user to ban (numeric ID).
Request Body Optional reason for banning the user (1-500 characters).
If removal_pending, retry_scheduled or warnings reports unfinished removal, the ban is recorded but access removal must not be treated as complete.
curl -X PUT "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/ban/123456789012345678" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' const project_id = 'YOUR_PROJECT_ID' ;
const user_id = '123456789012345678' ;
const response = await fetch ( `https://api.botsubscription.com/v2/projects/${ project_id }/ban/${ user_id }` , {
method: 'PUT' ,
headers: {
'Authorization' : 'Bearer YOUR_API_KEY' ,
'Content-Type' : 'application/json'
},
body: JSON . stringify ({})
});
const data = await response. json (); import requests
project_id = 'YOUR_PROJECT_ID'
user_id = '123456789012345678'
response = requests.put(
f 'https://api.botsubscription.com/v2/projects/ { project_id } /ban/ { user_id } ' ,
headers = { 'Authorization' : 'Bearer YOUR_API_KEY' },
json = {}
)
data = response.json() $project_id = 'YOUR_PROJECT_ID' ;
$user_id = '123456789012345678' ;
$ch = curl_init ();
curl_setopt ($ch, CURLOPT_URL , "https://api.botsubscription.com/v2/projects/{ $project_id }/ban/{ $user_id }" );
curl_setopt ($ch, CURLOPT_CUSTOMREQUEST , 'PUT' );
curl_setopt ($ch, CURLOPT_HTTPHEADER , [ 'Authorization: Bearer YOUR_API_KEY' , 'Content-Type: application/json' ]);
curl_setopt ($ch, CURLOPT_POSTFIELDS , '{}' );
curl_setopt ($ch, CURLOPT_RETURNTRANSFER , true );
$response = curl_exec ($ch); User banned application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "PUT" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/ban/123456789012345678" ,
"code" : 200 ,
"message" : "User banned successfully" ,
"data" : {
"user_id" : "123456789012345678" ,
"banned_at" : "2025-01-15T10:30:00.000Z" ,
"banned_by" : null ,
"banned_reason" : null
}
} User banned; access removal is still pending application/json
{
"ok" : true ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "PUT" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/ban/123456789012345678" ,
"code" : 200 ,
"message" : "User banned successfully" ,
"data" : {
"user_id" : "123456789012345678" ,
"banned_at" : "2025-01-15T10:30:00.000Z" ,
"banned_by" : null ,
"banned_reason" : null ,
"removal_pending" : true ,
"retry_scheduled" : true ,
"warnings" : [
"Membership removal is awaiting a retry."
]
}
} User already banned application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "PUT" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/ban/123456789012345678" ,
"code" : 409 ,
"error" : {
"error_code" : "CONFLICT" ,
"message" : "User is already banned."
}
} User not found application/json
{
"ok" : false ,
"request_id" : "11111111-1111-1111-1111-111111111111" ,
"method" : "PUT" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/ban/123456789012345678" ,
"code" : 404 ,
"error" : {
"error_code" : "NOT_FOUND" ,
"message" : "User not found"
}
} Invalid or expired API key application/json
{
"ok" : false ,
"request_id" : "44444444-4444-4444-8444-444444444444" ,
"method" : "PUT" ,
"path" : "/v2/projects/11111111-1111-4111-8111-111111111111/ban/123456789012345678" ,
"code" : 401 ,
"error" : {
"message" : "Invalid or expired authentication token." ,
"error_code" : "UNAUTHORIZED"
}
} Last updated: November 4, 2026
PreviousList Banned Next Unban User