Billing

Ban a user

Admin-only endpoint that bans a user account: it deactivates the account, rotates the email activation token so a leaked/shared token cannot reactivate it, and sets is_banned. This is the only way a user gets banned — the previous automated excessive-usage monitor that banned accounts on its own has been removed; banning now happens exclusively through this endpoint.

post/admin/billing/users/{id}/ban

Request

  • Base URL: https://api.crawlora.net/api/v1
  • URL: https://api.crawlora.net/api/v1/admin/billing/users/{id}/ban
  • Auth: API key in header x-api-key

Path parameters

idstring required

User id

Headers

x-api-keystring required

Admin API key required unless an Admin JWT is already present

Request body

reasonstring

reason is an optional note recorded on the user's account explaining why they were banned.

Example request

{
  "reason": "repeated ToS violations — scraping outside plan limits"
}

Response

Updated account state

codeinteger
msgstring

Example response

{
  "code": 200,
  "data": {
    "ban_reason": "repeated ToS violations — scraping outside plan limits",
    "banned_at": "2026-08-13T10:00:00Z",
    "banned_by": "cc4cd7a9434885f42a257be7609b2de3",
    "created_at": "2026-07-02T09:08:34Z",
    "email": "founder@example.com",
    "id": "cc4cd7a9434885f42a257be7609b2de3",
    "is_activated": true,
    "last_login_at": "2026-07-14T16:30:28Z",
    "plan": "Free",
    "provider": "google",
    "signup_accept_language": "de-DE,de;q=0.9,en;q=0.8",
    "signup_browser_id_hash": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
    "signup_browser_language": "de",
    "signup_country": "US",
    "signup_ip": "203.0.113.10",
    "signup_last_referrer_host": "accounts.google.com",
    "signup_locale": "en",
    "signup_referrer_host": "www.google.com",
    "signup_region": "California",
    "username": "founder"
  },
  "msg": "OK"
}

Changes

No recorded changes to this operation across all 3 revisions of this API.