Users API

System user management with bulk operations.

All endpoints are prefixed with /api/users. Admin only.


Endpoints

MethodPathDescription
GET/users/listList system users
GET/users/meta/optionsShells and groups metadata
GET/users/:userGet user detail
POST/users/createCreate user
PUT/users/:userUpdate user
DELETE/users/:userDelete user
POST/users/bulkBulk operations

Request/Response

GET /users/list

{
  "users": [
    {
      "username": "www-data",
      "uid": 33,
      "gid": 33,
      "shell": "/usr/sbin/nologin",
      "home": "/var/www",
      "groups": ["www-data"]
    }
  ],
  "total": 25
}

POST /users/create

{
  "username": "deploy",
  "password": "securepass",
  "shell": "/bin/bash",
  "home": "/home/deploy",
  "groups": ["wheel"]
}

POST /users/bulk

{
  "action": "lock",
  "usernames": ["user1", "user2"]
}

Actions: lock, unlock, delete

GET /users/meta/options

{
  "shells": ["/bin/bash", "/bin/sh", "/usr/sbin/nologin", ...],
  "groups": ["root", "wheel", "www-data", ...]
}

Part of NexusPanel API Reference

← Back to Documentation