Registered User API
Note
This page describes backend registered user APIs for UserEntity, not frontend visitor session APIs.
Overview
User management APIs are provided by UserRestController. Base path:
/api/v1/user
Here, “user” means backend accounts such as:
- super admins
- admins
- agents
- supervisors
- operators
These accounts:
- must log in
- can join organizations
- can be assigned roles and permissions
- can access admin console and management APIs
Authentication
Get an access token first via:
POST /auth/v1/login
Then send:
Authorization: Bearer {accessToken}
Permission Model
UserRestController uses both roles and permissions:
- Roles:
ROLE_SUPER,ROLE_ADMIN - Permissions:
USER_READ,USER_CREATE,USER_UPDATE,USER_DELETE,USER_EXPORT
Main restrictions:
- query by organization:
ROLE_SUPER - create:
ROLE_SUPER - update:
USER_UPDATEorROLE_SUPER - delete:
ROLE_SUPER - export:
ROLE_SUPER - profile/organizations/switch organization:
USER_READorROLE_SUPER - admin change password:
ROLE_ADMIN
Core APIs
GET /api/v1/user/query/orgGET /api/v1/user/queryGET /api/v1/user/query/uidPOST /api/v1/user/createPOST /api/v1/user/updatePOST /api/v1/user/deleteGET /api/v1/user/exportGET /api/v1/user/profileGET /api/v1/user/organizationsPOST /api/v1/user/switch/organizationPOST /api/v1/user/change/passwordPOST /api/v1/user/admin/change/passwordPOST /api/v1/user/change/emailPOST /api/v1/user/change/mobilePOST /api/v1/user/logout
Key Distinction
- Use User API when you need backend accounts, login, roles, and permissions
- Do not use User API just because a business member is logged in on your storefront
- Business members entering chat are usually mapped to
VisitorEntity, notUserEntity