1. Admin - Users
Rootline API
  • Auth
    • Register customer account
      POST
    • User sign-in
      POST
    • User sign-out
      POST
    • Current session information
      GET
  • Users
    • Get current user profile
      GET
    • Update current user profile
      PATCH
  • Admin - Users
    • List and search users
      GET
    • Activate or deactivate user account
      PATCH
  • Addresses
    • List user shipping addresses
      GET
    • Create shipping address
      POST
    • Update shipping address
      PATCH
    • Delete shipping address
      DELETE
  • Health
    • Health check
      GET
  • Get application info and docs route
    GET
  • Schemas
    • AppInfoResponseDto
    • RegisterDto
    • AuthResponseDto
    • ErrorResponseDto
    • LoginDto
    • SignOutResponseDto
    • SessionResponseDto
    • UserProfileDto
    • UpdateProfileDto
    • AdminUserListResponseDto
    • AdminUpdateUserStatusDto
    • AdminUserItemDto
    • AddressResponseDto
    • CreateAddressDto
    • UpdateAddressDto
    • DeleteAddressResponseDto
  1. Admin - Users

Activate or deactivate user account

PATCH
/admin/users/{id}/status
Last modified:2026-11-03 23:10:15
Ban (deactivate) or unban (activate) user account. Immediately revokes sessions. Admins cannot deactivate themselves or the last remaining admin.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
User status successfully updated
Bodyapplication/json

🟠400
🟠401
🟠403
🟠404
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PATCH '/admin/users//status' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "banned": true,
    "banReason": "string"
}'
Response Response Example
200 - Example 1
{
    "id": "string",
    "name": "string",
    "email": "user@example.com",
    "emailVerified": true,
    "role": "string",
    "banned": true,
    "banReason": [
        "string"
    ],
    "image": [
        "string"
    ],
    "createdAt": "string",
    "updatedAt": "string"
}
Modified at 2026-11-03 23:10:15
Previous
List and search users
Next
List user shipping addresses
Built with