APIBan User

Ban User

Add a user to the ban list for a project.

PUT/v2/projects/{project_id}/ban/{user_id}

Authorization

Bearer TokenRequired

Path Parameters

project_idstringRequired

The unique identifier of the project.

user_idstringRequired

The unique identifier of the user to ban (numeric ID).

Request Body

reasonstring

Optional reason for banning the user.

Request
curl -X PUT "https://api.botsubscription.com/v2/projects/YOUR_PROJECT_ID/ban/123456789012345678" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
User bannedapplication/json
{
  "ok": true,
  "request_id": "11111111-1111-1111-1111-111111111111",
  "method": "PUT",
  "path": "/v2/projects/YOUR_PROJECT_ID/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": "Violation of terms"
  }
}

Last updated: