Users API
The Users API provides comprehensive user management operations including profile management, authentication, and file uploads.
This API is linked with the BshUsers entity.
Base Endpoint
/api/userEndpoints
| Method | Endpoint | Description | |
|---|---|---|---|
| POST | /api/users/init | Initialize a new user account | |
| POST | /api/users/invite | Invite a new user with email and roles | |
| GET | /api/users/me | Get current user profile | |
| PUT | /api/users/profile | Update user profile | |
| PUT | /api/users/password | Update user password | |
| POST | /api/users/picture | Upload profile picture | |
| GET | /api/users/{id} | Get a user by ID | Similar to Entities API |
| GET | /api/users?query | List and filter by URI parameters | Similar to Entities API |
| POST | /api/users/search | Search users by POST | Similar to Entities API |
| DELETE | /api/users/{id} | Delete a user | Similar to Entities API |
| GET | /api/users/count | Count users | Similar to Entities API |
| POST | /api/users/count | Count filtered users | Similar to Entities API |
| Admin | |||
| POST | /api/users/admin/activate-account/{email} | Activate a user account | Admin only |
| POST | /api/users/admin/resend-activation-email/{email} | Resend activation email | Admin only |
| POST | /api/users/admin/forget-password/{email} | Trigger forget password flow | Admin only |
Security
All Users API endpoints are secured by the authentication system. User management operations require proper authentication tokens and users can only access and modify their own profile data. Unauthorized requests will be denied accordingly.
Activation and admin roles
- Setting account status to ACTIVATED is restricted to
BSH_ADMIN(for example via/api/users/admin/activate-account/{email}). Non-admins cannot activate accounts through profile update or the generic Entities API. - Assigning the
BSH_ADMINrole requires an authenticated user who already hasBSH_ADMIN.
User records are not manageable through /api/entities/BshUsers; use this Users API (or the SDK User service).